<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Platform Security Architecture — cryptography and keystore interface: psa/crypto.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Platform Security Architecture — cryptography and keystore interface
   &#160;<span id="projectnumber">Working draft</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_7dae9cfde651cd3cb034485ce5e391b9.html">psa</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">crypto.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="crypto_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *  Copyright (C) 2018, ARM Limited, All Rights Reserved</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *  SPDX-License-Identifier: Apache-2.0</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *  Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *  not use this file except in compliance with the License.</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *  You may obtain a copy of the License at</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *  http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *  Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *  distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> *  See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> *  limitations under the License.</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#ifndef PSA_CRYPTO_H</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#define PSA_CRYPTO_H</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &quot;crypto_platform.h&quot;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &lt;stddef.h&gt;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#ifdef __DOXYGEN_ONLY__</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment">/* This __DOXYGEN_ONLY__ block contains mock definitions for things that</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment"> * must be defined in the crypto_platform.h header. These mock definitions</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment"> * are present in this file as a convenience to generate pretty-printed</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="comment"> * documentation that includes those definitions. */</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">   51</a></span>&#160;<span class="keyword">typedef</span> _unsigned_integral_type_ <a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a>;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* __DOXYGEN_ONLY__ */</span><span class="preprocessor"></span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="preprocessor">#if defined(PSA_SUCCESS)</span></div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="comment">/* If PSA_SUCCESS is defined, assume that PSA crypto is being used</span></div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="comment"> * together with PSA IPC, which also defines the identifier</span></div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="comment"> * PSA_SUCCESS. We must not define PSA_SUCCESS ourselves in that case;</span></div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="comment"> * the other error code names don&#39;t clash. Also define psa_status_t as</span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="comment"> * an alias for the type used by PSA IPC. This is a temporary hack</span></div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="comment"> * until we unify error reporting in PSA IPC and PSA crypto.</span></div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="comment"> * Note that psa_defs.h must be included before this header!</span></div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="keyword">typedef</span> psa_error_t <a class="code" href="group__basic.html#ga05676e70ba5c6a7565aff3c36677c1f9">psa_status_t</a>;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="preprocessor">#else </span><span class="comment">/* defined(PSA_SUCCESS) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="group__basic.html#ga05676e70ba5c6a7565aff3c36677c1f9">   85</a></span>&#160;<span class="keyword">typedef</span> int32_t <a class="code" href="group__basic.html#ga05676e70ba5c6a7565aff3c36677c1f9">psa_status_t</a>;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="group__basic.html#ga4cc859e2c66ca381c7418db3527a65e1">   88</a></span>&#160;<span class="preprocessor">#define PSA_SUCCESS ((psa_status_t)0)</span></div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* !defined(PSA_SUCCESS) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="group__basic.html#ga24d5fdcdd759f846f79d9e581c63a83f">   97</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_UNKNOWN_ERROR         ((psa_status_t)1)</span></div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="group__basic.html#ga1dcc6d130633ed5db8942257581b55dd">  106</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_NOT_SUPPORTED         ((psa_status_t)2)</span></div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="group__basic.html#ga4d1b8dd8526177a15a210b7afc1accb1">  119</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_NOT_PERMITTED         ((psa_status_t)3)</span></div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="group__basic.html#ga695025f4ec11249aee7ea3d0f65e01c8">  131</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_BUFFER_TOO_SMALL      ((psa_status_t)4)</span></div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="group__basic.html#gac2fee3a51249fbea45360aaa911f3e58">  139</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_OCCUPIED_SLOT         ((psa_status_t)5)</span></div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="group__basic.html#gaba00e3e6ceb2b12965a81e5ac02ae040">  147</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_EMPTY_SLOT            ((psa_status_t)6)</span></div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="group__basic.html#ga933d40fa2a591004f2e93aa91e11db84">  159</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_BAD_STATE             ((psa_status_t)7)</span></div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="group__basic.html#ga798df25a505ebf931f7bec1f80f1f85f">  170</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_INVALID_ARGUMENT      ((psa_status_t)8)</span></div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="group__basic.html#ga91b2ad8a867517a2651f1b076c5216e5">  176</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_INSUFFICIENT_MEMORY   ((psa_status_t)9)</span></div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno"><a class="line" href="group__basic.html#ga897a45eb206a6f6b7be7ffbe36f0d766">  185</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_INSUFFICIENT_STORAGE  ((psa_status_t)10)</span></div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;</div><div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="group__basic.html#ga5cdb6948371d49e916106249020ea3f7">  202</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_COMMUNICATION_FAILURE ((psa_status_t)11)</span></div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;</div><div class="line"><a name="l00227"></a><span class="lineno"><a class="line" href="group__basic.html#gadd169a1af2707862b95fb9df91dfc37d">  227</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_STORAGE_FAILURE       ((psa_status_t)12)</span></div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;</div><div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="group__basic.html#ga08b10e70fa5ff0b05c631d9f8f6b2c6b">  233</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_HARDWARE_FAILURE      ((psa_status_t)13)</span></div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;</div><div class="line"><a name="l00264"></a><span class="lineno"><a class="line" href="group__basic.html#ga2c5dda1485cb54f2385cb9c1279a7004">  264</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_TAMPERING_DETECTED    ((psa_status_t)14)</span></div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;</div><div class="line"><a name="l00283"></a><span class="lineno"><a class="line" href="group__basic.html#ga4deb59fec02297ec5d8b42178323f675">  283</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_INSUFFICIENT_ENTROPY  ((psa_status_t)15)</span></div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;</div><div class="line"><a name="l00293"></a><span class="lineno"><a class="line" href="group__basic.html#ga35927f755d232c4766de600f2c49e9f2">  293</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_INVALID_SIGNATURE     ((psa_status_t)16)</span></div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;</div><div class="line"><a name="l00309"></a><span class="lineno"><a class="line" href="group__basic.html#gabe29594edbfb152cf153975b0597ac48">  309</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_INVALID_PADDING       ((psa_status_t)17)</span></div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;</div><div class="line"><a name="l00315"></a><span class="lineno"><a class="line" href="group__basic.html#gaf1fa61f72e9e5b4a848c991bea495767">  315</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_INSUFFICIENT_CAPACITY ((psa_status_t)18)</span></div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;psa_status_t <a class="code" href="group__basic.html#ga2de150803fc2f7dc6101d5af7e921dd9">psa_crypto_init</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;<span class="preprocessor">#define PSA_BITS_TO_BYTES(bits) (((bits) + 7) / 8)</span></div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;<span class="preprocessor">#define PSA_BYTES_TO_BITS(bytes) ((bytes) * 8)</span></div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;</div><div class="line"><a name="l00346"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga578159487dfc7096cb191b0d2befe628">  346</a></span>&#160;<span class="keyword">typedef</span> uint32_t <a class="code" href="group__crypto__types.html#ga578159487dfc7096cb191b0d2befe628">psa_key_type_t</a>;</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;</div><div class="line"><a name="l00352"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gafce7ab2b54ce97ea5bff73f13a9f3e5b">  352</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_NONE                       ((psa_key_type_t)0x00000000)</span></div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;</div><div class="line"><a name="l00361"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga8dbaed2fdb1ebae8aa127ad3988516f7">  361</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_VENDOR_FLAG                ((psa_key_type_t)0x80000000)</span></div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;</div><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_CATEGORY_MASK              ((psa_key_type_t)0x7e000000)</span></div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;</div><div class="line"><a name="l00369"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaa97f92025533102616b32d571c940d80">  369</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_RAW_DATA                   ((psa_key_type_t)0x02000000)</span></div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_CATEGORY_SYMMETRIC         ((psa_key_type_t)0x04000000)</span></div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_CATEGORY_ASYMMETRIC        ((psa_key_type_t)0x06000000)</span></div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_PAIR_FLAG                  ((psa_key_type_t)0x01000000)</span></div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;</div><div class="line"><a name="l00383"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga92d989f4ca64abd00f463defd773a6f8">  383</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_HMAC                       ((psa_key_type_t)0x02000001)</span></div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;</div><div class="line"><a name="l00390"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gae871b2357b8593f33bfd51abbf93ebb1">  390</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_DERIVE                     ((psa_key_type_t)0x02000101)</span></div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;</div><div class="line"><a name="l00397"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga6ee54579dcf278c677eda4bb1a29575e">  397</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_AES                        ((psa_key_type_t)0x04000001)</span></div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;</div><div class="line"><a name="l00408"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga577562bfbbc691c820d55ec308333138">  408</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_DES                        ((psa_key_type_t)0x04000002)</span></div><div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;</div><div class="line"><a name="l00412"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gad8e5da742343fd5519f9d8a630c2ed81">  412</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_CAMELLIA                   ((psa_key_type_t)0x04000003)</span></div><div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;</div><div class="line"><a name="l00418"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gae4d46e83f910dcaa126000a8ed03cde9">  418</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_ARC4                       ((psa_key_type_t)0x04000004)</span></div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;</div><div class="line"><a name="l00421"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga9ba0878f56c8bcd1995ac017a74f513b">  421</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_RSA_PUBLIC_KEY             ((psa_key_type_t)0x06010000)</span></div><div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;</div><div class="line"><a name="l00423"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga581f50687f5d650456925278948f2799">  423</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_RSA_KEYPAIR                ((psa_key_type_t)0x07010000)</span></div><div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;</div><div class="line"><a name="l00426"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga5e7439c2905136366c3a876e62e5ddfc">  426</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_DSA_PUBLIC_KEY             ((psa_key_type_t)0x06020000)</span></div><div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;</div><div class="line"><a name="l00428"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga011010ee28c20388f3d89fb27088ed62">  428</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_DSA_KEYPAIR                ((psa_key_type_t)0x07020000)</span></div><div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;</div><div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE        ((psa_key_type_t)0x06030000)</span></div><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_ECC_KEYPAIR_BASE           ((psa_key_type_t)0x07030000)</span></div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_ECC_CURVE_MASK             ((psa_key_type_t)0x0000ffff)</span></div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;</div><div class="line"><a name="l00434"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gadf3ad65d157bf5282849c954bf3f51af">  434</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_ECC_KEYPAIR(curve)         \</span></div><div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;<span class="preprocessor">    (PSA_KEY_TYPE_ECC_KEYPAIR_BASE | (curve))</span></div><div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;</div><div class="line"><a name="l00437"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gad54c03d3b47020e571a72cd01d978cf2">  437</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_ECC_PUBLIC_KEY(curve)              \</span></div><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;<span class="preprocessor">    (PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE | (curve))</span></div><div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;</div><div class="line"><a name="l00441"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gadbe4c086a6562aefe344bc79e51bdfd3">  441</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_VENDOR_DEFINED(type) \</span></div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;<span class="preprocessor">    (((type) &amp; PSA_KEY_TYPE_VENDOR_FLAG) != 0)</span></div><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;</div><div class="line"><a name="l00445"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gab138ae2ebf2905dfbaf4154db2620939">  445</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_ASYMMETRIC(type)                                \</span></div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;<span class="preprocessor">    (((type) &amp; PSA_KEY_TYPE_CATEGORY_MASK) == PSA_KEY_TYPE_CATEGORY_ASYMMETRIC)</span></div><div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;</div><div class="line"><a name="l00448"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gac674a0f059bc0cb72b47f0c517b4f45b">  448</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_PUBLIC_KEY(type)                                \</span></div><div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;<span class="preprocessor">    (((type) &amp; (PSA_KEY_TYPE_CATEGORY_MASK | PSA_KEY_TYPE_PAIR_FLAG)) == \</span></div><div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;<span class="preprocessor">      PSA_KEY_TYPE_CATEGORY_ASYMMETRIC)</span></div><div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;</div><div class="line"><a name="l00453"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gac14c6d6e1b2b7f4a92a7b757465cff29">  453</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_KEYPAIR(type)                                   \</span></div><div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;<span class="preprocessor">    (((type) &amp; (PSA_KEY_TYPE_CATEGORY_MASK | PSA_KEY_TYPE_PAIR_FLAG)) == \</span></div><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;<span class="preprocessor">     (PSA_KEY_TYPE_CATEGORY_ASYMMETRIC | PSA_KEY_TYPE_PAIR_FLAG))</span></div><div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;</div><div class="line"><a name="l00457"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaf09f1ca1de6a7e7cff0fe516f3f6c91d">  457</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_KEYPAIR_OF_PUBLIC_KEY(type)        \</span></div><div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;<span class="preprocessor">    ((type) | PSA_KEY_TYPE_PAIR_FLAG)</span></div><div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;</div><div class="line"><a name="l00460"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gace08e46dd7cbf642d50d982a25d02bec">  460</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_PUBLIC_KEY_OF_KEYPAIR(type)        \</span></div><div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;<span class="preprocessor">    ((type) &amp; ~PSA_KEY_TYPE_PAIR_FLAG)</span></div><div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;</div><div class="line"><a name="l00463"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga0e1d8f241228e49c9cadadfb4579ef1a">  463</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_RSA(type)                                       \</span></div><div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;<span class="preprocessor">    (PSA_KEY_TYPE_PUBLIC_KEY_OF_KEYPAIR(type) == PSA_KEY_TYPE_RSA_PUBLIC_KEY)</span></div><div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;</div><div class="line"><a name="l00467"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga88e01fa06b585654689a99bcc06bbe66">  467</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_ECC(type)                                       \</span></div><div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;<span class="preprocessor">    ((PSA_KEY_TYPE_PUBLIC_KEY_OF_KEYPAIR(type) &amp;                        \</span></div><div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;<span class="preprocessor">      ~PSA_KEY_TYPE_ECC_CURVE_MASK) == PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE)</span></div><div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_ECC_KEYPAIR(type)                               \</span></div><div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;<span class="preprocessor">    (((type) &amp; ~PSA_KEY_TYPE_ECC_CURVE_MASK) ==                         \</span></div><div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;<span class="preprocessor">     PSA_KEY_TYPE_ECC_KEYPAIR_BASE)</span></div><div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY(type)                            \</span></div><div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;<span class="preprocessor">    (((type) &amp; ~PSA_KEY_TYPE_ECC_CURVE_MASK) ==                         \</span></div><div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;<span class="preprocessor">     PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE)</span></div><div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;</div><div class="line"><a name="l00478"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga4e8977c145cce5077c4bce7fec890ad9">  478</a></span>&#160;<span class="keyword">typedef</span> uint16_t <a class="code" href="group__crypto__types.html#ga4e8977c145cce5077c4bce7fec890ad9">psa_ecc_curve_t</a>;</div><div class="line"><a name="l00480"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga0c567210e6f80aa8f2aa87efa7a3a3f9">  480</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_GET_CURVE(type)                             \</span></div><div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;<span class="preprocessor">    ((psa_ecc_curve_t) (PSA_KEY_TYPE_IS_ECC(type) ?              \</span></div><div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;<span class="preprocessor">                        ((type) &amp; PSA_KEY_TYPE_ECC_CURVE_MASK) : \</span></div><div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;<span class="preprocessor">                        0))</span></div><div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;</div><div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;<span class="comment">/* The encoding of curve identifiers is currently aligned with the</span></div><div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;<span class="comment"> * TLS Supported Groups Registry (formerly known as the</span></div><div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;<span class="comment"> * TLS EC Named Curve Registry)</span></div><div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;<span class="comment"> * https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8</span></div><div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;<span class="comment"> * The values are defined by RFC 4492, RFC 7027 and RFC 7919. */</span></div><div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT163K1         ((psa_ecc_curve_t) 0x0001)</span></div><div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT163R1         ((psa_ecc_curve_t) 0x0002)</span></div><div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT163R2         ((psa_ecc_curve_t) 0x0003)</span></div><div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT193R1         ((psa_ecc_curve_t) 0x0004)</span></div><div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT193R2         ((psa_ecc_curve_t) 0x0005)</span></div><div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT233K1         ((psa_ecc_curve_t) 0x0006)</span></div><div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT233R1         ((psa_ecc_curve_t) 0x0007)</span></div><div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT239K1         ((psa_ecc_curve_t) 0x0008)</span></div><div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT283K1         ((psa_ecc_curve_t) 0x0009)</span></div><div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT283R1         ((psa_ecc_curve_t) 0x000a)</span></div><div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT409K1         ((psa_ecc_curve_t) 0x000b)</span></div><div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT409R1         ((psa_ecc_curve_t) 0x000c)</span></div><div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT571K1         ((psa_ecc_curve_t) 0x000d)</span></div><div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT571R1         ((psa_ecc_curve_t) 0x000e)</span></div><div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP160K1         ((psa_ecc_curve_t) 0x000f)</span></div><div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP160R1         ((psa_ecc_curve_t) 0x0010)</span></div><div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP160R2         ((psa_ecc_curve_t) 0x0011)</span></div><div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP192K1         ((psa_ecc_curve_t) 0x0012)</span></div><div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP192R1         ((psa_ecc_curve_t) 0x0013)</span></div><div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP224K1         ((psa_ecc_curve_t) 0x0014)</span></div><div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP224R1         ((psa_ecc_curve_t) 0x0015)</span></div><div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP256K1         ((psa_ecc_curve_t) 0x0016)</span></div><div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP256R1         ((psa_ecc_curve_t) 0x0017)</span></div><div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP384R1         ((psa_ecc_curve_t) 0x0018)</span></div><div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP521R1         ((psa_ecc_curve_t) 0x0019)</span></div><div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_BRAINPOOL_P256R1  ((psa_ecc_curve_t) 0x001a)</span></div><div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_BRAINPOOL_P384R1  ((psa_ecc_curve_t) 0x001b)</span></div><div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_BRAINPOOL_P512R1  ((psa_ecc_curve_t) 0x001c)</span></div><div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_CURVE25519        ((psa_ecc_curve_t) 0x001d)</span></div><div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_CURVE448          ((psa_ecc_curve_t) 0x001e)</span></div><div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_FFDHE_2048        ((psa_ecc_curve_t) 0x0100)</span></div><div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_FFDHE_3072        ((psa_ecc_curve_t) 0x0101)</span></div><div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_FFDHE_4096        ((psa_ecc_curve_t) 0x0102)</span></div><div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_FFDHE_6144        ((psa_ecc_curve_t) 0x0103)</span></div><div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_FFDHE_8192        ((psa_ecc_curve_t) 0x0104)</span></div><div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;</div><div class="line"><a name="l00544"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gacaa366bdeb0413e63e87a667c5457b2e">  544</a></span>&#160;<span class="preprocessor">#define PSA_BLOCK_CIPHER_BLOCK_SIZE(type)            \</span></div><div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;<span class="preprocessor">    (                                                \</span></div><div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;<span class="preprocessor">        (type) == PSA_KEY_TYPE_AES ? 16 :            \</span></div><div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;<span class="preprocessor">        (type) == PSA_KEY_TYPE_DES ? 8 :             \</span></div><div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;<span class="preprocessor">        (type) == PSA_KEY_TYPE_CAMELLIA ? 16 :       \</span></div><div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;<span class="preprocessor">        (type) == PSA_KEY_TYPE_ARC4 ? 1 :            \</span></div><div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;<span class="preprocessor">        0)</span></div><div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;</div><div class="line"><a name="l00560"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gac2e4d47f1300d73c2f829a6d99252d69">  560</a></span>&#160;<span class="keyword">typedef</span> uint32_t <a class="code" href="group__crypto__types.html#gac2e4d47f1300d73c2f829a6d99252d69">psa_algorithm_t</a>;</div><div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;</div><div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;<span class="preprocessor">#define PSA_ALG_VENDOR_FLAG                     ((psa_algorithm_t)0x80000000)</span></div><div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_MASK                   ((psa_algorithm_t)0x7f000000)</span></div><div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_HASH                   ((psa_algorithm_t)0x01000000)</span></div><div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_MAC                    ((psa_algorithm_t)0x02000000)</span></div><div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_CIPHER                 ((psa_algorithm_t)0x04000000)</span></div><div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_AEAD                   ((psa_algorithm_t)0x06000000)</span></div><div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_SIGN                   ((psa_algorithm_t)0x10000000)</span></div><div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_ASYMMETRIC_ENCRYPTION  ((psa_algorithm_t)0x12000000)</span></div><div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_KEY_AGREEMENT          ((psa_algorithm_t)0x22000000)</span></div><div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_KEY_DERIVATION         ((psa_algorithm_t)0x30000000)</span></div><div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;</div><div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_VENDOR_DEFINED(alg)                                  \</span></div><div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_VENDOR_FLAG) != 0)</span></div><div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;</div><div class="line"><a name="l00584"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gac9280662bb482590b4b33d1dcd32930f">  584</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_HASH(alg)                                            \</span></div><div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_HASH)</span></div><div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;</div><div class="line"><a name="l00595"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaca7aee4c9dde316b3b1a150a26eab776">  595</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_MAC(alg)                                             \</span></div><div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_MAC)</span></div><div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;</div><div class="line"><a name="l00606"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga1d1a5a402ad89a2e68f12bfb535490eb">  606</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_CIPHER(alg)                                          \</span></div><div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_CIPHER)</span></div><div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160;</div><div class="line"><a name="l00618"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga1d44829d60065eaa4ac9a703e7d6abc8">  618</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_AEAD(alg)                                            \</span></div><div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_AEAD)</span></div><div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;</div><div class="line"><a name="l00629"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga6d490d0904e0698f6c1268a89d72ff31">  629</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_SIGN(alg)                                            \</span></div><div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_SIGN)</span></div><div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;</div><div class="line"><a name="l00640"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga41d2ee937d54efd76bd54a97b2ebc08a">  640</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_ASYMMETRIC_ENCRYPTION(alg)                           \</span></div><div class="line"><a name="l00641"></a><span class="lineno">  641</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_ASYMMETRIC_ENCRYPTION)</span></div><div class="line"><a name="l00642"></a><span class="lineno">  642</span>&#160;</div><div class="line"><a name="l00651"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga59753742cb06553bd22751bbef472b6f">  651</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_KEY_AGREEMENT(alg)                                   \</span></div><div class="line"><a name="l00652"></a><span class="lineno">  652</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_KEY_AGREEMENT)</span></div><div class="line"><a name="l00653"></a><span class="lineno">  653</span>&#160;</div><div class="line"><a name="l00662"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaf8b90c648aa53dbd06c236695e300cd0">  662</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_KEY_DERIVATION(alg)                                  \</span></div><div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_KEY_DERIVATION)</span></div><div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;</div><div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;<span class="preprocessor">#define PSA_ALG_HASH_MASK                       ((psa_algorithm_t)0x000000ff)</span></div><div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;<span class="preprocessor">#define PSA_ALG_MD2                             ((psa_algorithm_t)0x01000001)</span></div><div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;<span class="preprocessor">#define PSA_ALG_MD4                             ((psa_algorithm_t)0x01000002)</span></div><div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;<span class="preprocessor">#define PSA_ALG_MD5                             ((psa_algorithm_t)0x01000003)</span></div><div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;<span class="preprocessor">#define PSA_ALG_RIPEMD160                       ((psa_algorithm_t)0x01000004)</span></div><div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;<span class="preprocessor">#define PSA_ALG_SHA_1                           ((psa_algorithm_t)0x01000005)</span></div><div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;</div><div class="line"><a name="l00672"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga25d6a3244d10a7148fe6b026d1979f7b">  672</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA_224                         ((psa_algorithm_t)0x01000008)</span></div><div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;</div><div class="line"><a name="l00674"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga619471f978e13cdd0a1e37145e4bf341">  674</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA_256                         ((psa_algorithm_t)0x01000009)</span></div><div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;</div><div class="line"><a name="l00676"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga58af64dd9a86a287e8da9ed7739eead4">  676</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA_384                         ((psa_algorithm_t)0x0100000a)</span></div><div class="line"><a name="l00677"></a><span class="lineno">  677</span>&#160;</div><div class="line"><a name="l00678"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gafba3ae409f46d3dd7f37a0910660c3e9">  678</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA_512                         ((psa_algorithm_t)0x0100000b)</span></div><div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;</div><div class="line"><a name="l00680"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga3fe2d7c3c80e3186ca78d16a35d5d931">  680</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA_512_224                     ((psa_algorithm_t)0x0100000c)</span></div><div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;</div><div class="line"><a name="l00682"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga5910b3964c14e9613e8643a45b09c2d4">  682</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA_512_256                     ((psa_algorithm_t)0x0100000d)</span></div><div class="line"><a name="l00683"></a><span class="lineno">  683</span>&#160;</div><div class="line"><a name="l00684"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga16f5fe34ccce68c2fada1224c054a999">  684</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA3_224                        ((psa_algorithm_t)0x01000010)</span></div><div class="line"><a name="l00685"></a><span class="lineno">  685</span>&#160;</div><div class="line"><a name="l00686"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaace70d9515489bbe3c5e7ac1b7d9155b">  686</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA3_256                        ((psa_algorithm_t)0x01000011)</span></div><div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160;</div><div class="line"><a name="l00688"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gab0f079257ea75e2acfe2fc3b38c78cd8">  688</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA3_384                        ((psa_algorithm_t)0x01000012)</span></div><div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;</div><div class="line"><a name="l00690"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga37e5dbe936dddb155e76f2997de27188">  690</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA3_512                        ((psa_algorithm_t)0x01000013)</span></div><div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;</div><div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;<span class="preprocessor">#define PSA_ALG_MAC_SUBCATEGORY_MASK            ((psa_algorithm_t)0x00c00000)</span></div><div class="line"><a name="l00693"></a><span class="lineno">  693</span>&#160;<span class="preprocessor">#define PSA_ALG_HMAC_BASE                       ((psa_algorithm_t)0x02800000)</span></div><div class="line"><a name="l00694"></a><span class="lineno">  694</span>&#160;</div><div class="line"><a name="l00705"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga70f397425684b3efcde1e0e34c28261f">  705</a></span>&#160;<span class="preprocessor">#define PSA_ALG_HMAC(hash_alg)                                  \</span></div><div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;<span class="preprocessor">    (PSA_ALG_HMAC_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l00707"></a><span class="lineno">  707</span>&#160;</div><div class="line"><a name="l00708"></a><span class="lineno">  708</span>&#160;<span class="preprocessor">#define PSA_ALG_HMAC_HASH(hmac_alg)                             \</span></div><div class="line"><a name="l00709"></a><span class="lineno">  709</span>&#160;<span class="preprocessor">    (PSA_ALG_CATEGORY_HASH | ((hmac_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;</div><div class="line"><a name="l00721"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga4a050c3c3cbc6eb96418f18847601c8a">  721</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_HMAC(alg)                                            \</span></div><div class="line"><a name="l00722"></a><span class="lineno">  722</span>&#160;<span class="preprocessor">    (((alg) &amp; (PSA_ALG_CATEGORY_MASK | PSA_ALG_MAC_SUBCATEGORY_MASK)) == \</span></div><div class="line"><a name="l00723"></a><span class="lineno">  723</span>&#160;<span class="preprocessor">     PSA_ALG_HMAC_BASE)</span></div><div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;</div><div class="line"><a name="l00725"></a><span class="lineno">  725</span>&#160;<span class="preprocessor">#define PSA_ALG_CIPHER_MAC_BASE                 ((psa_algorithm_t)0x02c00000)</span></div><div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;<span class="preprocessor">#define PSA_ALG_CBC_MAC                         ((psa_algorithm_t)0x02c00001)</span></div><div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;<span class="preprocessor">#define PSA_ALG_CMAC                            ((psa_algorithm_t)0x02c00002)</span></div><div class="line"><a name="l00728"></a><span class="lineno">  728</span>&#160;<span class="preprocessor">#define PSA_ALG_GMAC                            ((psa_algorithm_t)0x02c00003)</span></div><div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160;</div><div class="line"><a name="l00738"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga8986360ff97dbd91f220edf9202e375d">  738</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_CIPHER_MAC(alg)                                      \</span></div><div class="line"><a name="l00739"></a><span class="lineno">  739</span>&#160;<span class="preprocessor">    (((alg) &amp; (PSA_ALG_CATEGORY_MASK | PSA_ALG_MAC_SUBCATEGORY_MASK)) == \</span></div><div class="line"><a name="l00740"></a><span class="lineno">  740</span>&#160;<span class="preprocessor">     PSA_ALG_CIPHER_MAC_BASE)</span></div><div class="line"><a name="l00741"></a><span class="lineno">  741</span>&#160;</div><div class="line"><a name="l00742"></a><span class="lineno">  742</span>&#160;<span class="preprocessor">#define PSA_ALG_CIPHER_SUBCATEGORY_MASK         ((psa_algorithm_t)0x00c00000)</span></div><div class="line"><a name="l00743"></a><span class="lineno">  743</span>&#160;<span class="preprocessor">#define PSA_ALG_BLOCK_CIPHER_BASE               ((psa_algorithm_t)0x04000000)</span></div><div class="line"><a name="l00744"></a><span class="lineno">  744</span>&#160;<span class="preprocessor">#define PSA_ALG_BLOCK_CIPHER_MODE_MASK          ((psa_algorithm_t)0x000000ff)</span></div><div class="line"><a name="l00745"></a><span class="lineno">  745</span>&#160;<span class="preprocessor">#define PSA_ALG_BLOCK_CIPHER_PADDING_MASK       ((psa_algorithm_t)0x003f0000)</span></div><div class="line"><a name="l00746"></a><span class="lineno">  746</span>&#160;</div><div class="line"><a name="l00752"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga0992d26a02a2a7dc316cd5abc5254966">  752</a></span>&#160;<span class="preprocessor">#define PSA_ALG_BLOCK_CIPHER_PAD_NONE           ((psa_algorithm_t)0x00000000)</span></div><div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160;</div><div class="line"><a name="l00754"></a><span class="lineno">  754</span>&#160;<span class="preprocessor">#define PSA_ALG_BLOCK_CIPHER_PAD_PKCS7          ((psa_algorithm_t)0x00010000)</span></div><div class="line"><a name="l00755"></a><span class="lineno">  755</span>&#160;</div><div class="line"><a name="l00776"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga02e787d79c0cd666efcd090569d5b31c">  776</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_BLOCK_CIPHER(alg)            \</span></div><div class="line"><a name="l00777"></a><span class="lineno">  777</span>&#160;<span class="preprocessor">    (((alg) &amp; (PSA_ALG_CATEGORY_MASK | PSA_ALG_CIPHER_SUBCATEGORY_MASK)) == \</span></div><div class="line"><a name="l00778"></a><span class="lineno">  778</span>&#160;<span class="preprocessor">        PSA_ALG_BLOCK_CIPHER_BASE)</span></div><div class="line"><a name="l00779"></a><span class="lineno">  779</span>&#160;</div><div class="line"><a name="l00782"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga931f31d4f05c3dab9fd5d7fdcd3715f2">  782</a></span>&#160;<span class="preprocessor">#define PSA_ALG_CBC_BASE                        ((psa_algorithm_t)0x04000001)</span></div><div class="line"><a name="l00783"></a><span class="lineno">  783</span>&#160;<span class="preprocessor">#define PSA_ALG_CFB_BASE                        ((psa_algorithm_t)0x04000002)</span></div><div class="line"><a name="l00784"></a><span class="lineno">  784</span>&#160;<span class="preprocessor">#define PSA_ALG_OFB_BASE                        ((psa_algorithm_t)0x04000003)</span></div><div class="line"><a name="l00785"></a><span class="lineno">  785</span>&#160;<span class="preprocessor">#define PSA_ALG_XTS_BASE                        ((psa_algorithm_t)0x04000004)</span></div><div class="line"><a name="l00786"></a><span class="lineno">  786</span>&#160;</div><div class="line"><a name="l00787"></a><span class="lineno">  787</span>&#160;<span class="preprocessor">#define PSA_ALG_STREAM_CIPHER_BASE              ((psa_algorithm_t)0x04800000)</span></div><div class="line"><a name="l00788"></a><span class="lineno">  788</span>&#160;</div><div class="line"><a name="l00796"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gad318309706a769cffdc64e4c7e06b2e9">  796</a></span>&#160;<span class="preprocessor">#define PSA_ALG_CTR                             ((psa_algorithm_t)0x04800001)</span></div><div class="line"><a name="l00797"></a><span class="lineno">  797</span>&#160;</div><div class="line"><a name="l00800"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gab6a5284decb0e5e1b5b8740a41ef3c5e">  800</a></span>&#160;<span class="preprocessor">#define PSA_ALG_ARC4                            ((psa_algorithm_t)0x04800002)</span></div><div class="line"><a name="l00801"></a><span class="lineno">  801</span>&#160;</div><div class="line"><a name="l00814"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gacfec68e0c6175e02e1b2ebc97df383c0">  814</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_STREAM_CIPHER(alg)            \</span></div><div class="line"><a name="l00815"></a><span class="lineno">  815</span>&#160;<span class="preprocessor">    (((alg) &amp; (PSA_ALG_CATEGORY_MASK | PSA_ALG_CIPHER_SUBCATEGORY_MASK)) == \</span></div><div class="line"><a name="l00816"></a><span class="lineno">  816</span>&#160;<span class="preprocessor">        PSA_ALG_STREAM_CIPHER_BASE)</span></div><div class="line"><a name="l00817"></a><span class="lineno">  817</span>&#160;</div><div class="line"><a name="l00818"></a><span class="lineno">  818</span>&#160;<span class="preprocessor">#define PSA_ALG_CCM                             ((psa_algorithm_t)0x06000001)</span></div><div class="line"><a name="l00819"></a><span class="lineno">  819</span>&#160;<span class="preprocessor">#define PSA_ALG_GCM                             ((psa_algorithm_t)0x06000002)</span></div><div class="line"><a name="l00820"></a><span class="lineno">  820</span>&#160;</div><div class="line"><a name="l00821"></a><span class="lineno">  821</span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_PKCS1V15_SIGN_BASE          ((psa_algorithm_t)0x10020000)</span></div><div class="line"><a name="l00822"></a><span class="lineno">  822</span>&#160;</div><div class="line"><a name="l00835"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga702ff75385a6ae7d4247033f479439af">  835</a></span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_PKCS1V15_SIGN(hash_alg)                             \</span></div><div class="line"><a name="l00836"></a><span class="lineno">  836</span>&#160;<span class="preprocessor">    (PSA_ALG_RSA_PKCS1V15_SIGN_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l00837"></a><span class="lineno">  837</span>&#160;</div><div class="line"><a name="l00843"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga4215e2a78dcf834e9a625927faa2a817">  843</a></span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_PKCS1V15_SIGN_RAW PSA_ALG_RSA_PKCS1V15_SIGN_BASE</span></div><div class="line"><a name="l00844"></a><span class="lineno">  844</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_RSA_PKCS1V15_SIGN(alg)                               \</span></div><div class="line"><a name="l00845"></a><span class="lineno">  845</span>&#160;<span class="preprocessor">    (((alg) &amp; ~PSA_ALG_HASH_MASK) == PSA_ALG_RSA_PKCS1V15_SIGN_BASE)</span></div><div class="line"><a name="l00846"></a><span class="lineno">  846</span>&#160;</div><div class="line"><a name="l00847"></a><span class="lineno">  847</span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_PSS_BASE               ((psa_algorithm_t)0x10030000)</span></div><div class="line"><a name="l00848"></a><span class="lineno">  848</span>&#160;</div><div class="line"><a name="l00864"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga62152bf4cb4bf6aace5e1be8f143564d">  864</a></span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_PSS(hash_alg)                               \</span></div><div class="line"><a name="l00865"></a><span class="lineno">  865</span>&#160;<span class="preprocessor">    (PSA_ALG_RSA_PSS_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l00866"></a><span class="lineno">  866</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_RSA_PSS(alg)                                 \</span></div><div class="line"><a name="l00867"></a><span class="lineno">  867</span>&#160;<span class="preprocessor">    (((alg) &amp; ~PSA_ALG_HASH_MASK) == PSA_ALG_RSA_PSS_BASE)</span></div><div class="line"><a name="l00868"></a><span class="lineno">  868</span>&#160;</div><div class="line"><a name="l00869"></a><span class="lineno">  869</span>&#160;<span class="preprocessor">#define PSA_ALG_DSA_BASE                        ((psa_algorithm_t)0x10040000)</span></div><div class="line"><a name="l00870"></a><span class="lineno">  870</span>&#160;</div><div class="line"><a name="l00882"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga9a68efdddff5ae95f104a1416b12742e">  882</a></span>&#160;<span class="preprocessor">#define PSA_ALG_DSA(hash_alg)                             \</span></div><div class="line"><a name="l00883"></a><span class="lineno">  883</span>&#160;<span class="preprocessor">    (PSA_ALG_DSA_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l00884"></a><span class="lineno">  884</span>&#160;<span class="preprocessor">#define PSA_ALG_DETERMINISTIC_DSA_BASE          ((psa_algorithm_t)0x10050000)</span></div><div class="line"><a name="l00885"></a><span class="lineno">  885</span>&#160;<span class="preprocessor">#define PSA_ALG_DSA_DETERMINISTIC_FLAG          ((psa_algorithm_t)0x00010000)</span></div><div class="line"><a name="l00886"></a><span class="lineno">  886</span>&#160;<span class="preprocessor">#define PSA_ALG_DETERMINISTIC_DSA(hash_alg)                             \</span></div><div class="line"><a name="l00887"></a><span class="lineno">  887</span>&#160;<span class="preprocessor">    (PSA_ALG_DETERMINISTIC_DSA_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l00888"></a><span class="lineno">  888</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_DSA(alg)                                             \</span></div><div class="line"><a name="l00889"></a><span class="lineno">  889</span>&#160;<span class="preprocessor">    (((alg) &amp; ~PSA_ALG_HASH_MASK &amp; ~PSA_ALG_DSA_DETERMINISTIC_FLAG) ==  \</span></div><div class="line"><a name="l00890"></a><span class="lineno">  890</span>&#160;<span class="preprocessor">     PSA_ALG_DSA_BASE)</span></div><div class="line"><a name="l00891"></a><span class="lineno">  891</span>&#160;<span class="preprocessor">#define PSA_ALG_DSA_IS_DETERMINISTIC(alg)               \</span></div><div class="line"><a name="l00892"></a><span class="lineno">  892</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_DSA_DETERMINISTIC_FLAG) != 0)</span></div><div class="line"><a name="l00893"></a><span class="lineno">  893</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_DETERMINISTIC_DSA(alg)                       \</span></div><div class="line"><a name="l00894"></a><span class="lineno">  894</span>&#160;<span class="preprocessor">    (PSA_ALG_IS_DSA(alg) &amp;&amp; PSA_ALG_DSA_IS_DETERMINISTIC(alg))</span></div><div class="line"><a name="l00895"></a><span class="lineno">  895</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_RANDOMIZED_DSA(alg)                          \</span></div><div class="line"><a name="l00896"></a><span class="lineno">  896</span>&#160;<span class="preprocessor">    (PSA_ALG_IS_DSA(alg) &amp;&amp; !PSA_ALG_DSA_IS_DETERMINISTIC(alg))</span></div><div class="line"><a name="l00897"></a><span class="lineno">  897</span>&#160;</div><div class="line"><a name="l00898"></a><span class="lineno">  898</span>&#160;<span class="preprocessor">#define PSA_ALG_ECDSA_BASE                      ((psa_algorithm_t)0x10060000)</span></div><div class="line"><a name="l00899"></a><span class="lineno">  899</span>&#160;</div><div class="line"><a name="l00917"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga7e3ce9f514a227d5ba5d8318870452e3">  917</a></span>&#160;<span class="preprocessor">#define PSA_ALG_ECDSA(hash_alg)                                 \</span></div><div class="line"><a name="l00918"></a><span class="lineno">  918</span>&#160;<span class="preprocessor">    (PSA_ALG_ECDSA_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l00919"></a><span class="lineno">  919</span>&#160;</div><div class="line"><a name="l00928"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga51d6b6044a62e33cae0cf64bfc3b22a4">  928</a></span>&#160;<span class="preprocessor">#define PSA_ALG_ECDSA_ANY PSA_ALG_ECDSA_BASE</span></div><div class="line"><a name="l00929"></a><span class="lineno">  929</span>&#160;<span class="preprocessor">#define PSA_ALG_DETERMINISTIC_ECDSA_BASE        ((psa_algorithm_t)0x10070000)</span></div><div class="line"><a name="l00930"></a><span class="lineno">  930</span>&#160;</div><div class="line"><a name="l00950"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga11da566bcd341661c8de921e2ca5ed03">  950</a></span>&#160;<span class="preprocessor">#define PSA_ALG_DETERMINISTIC_ECDSA(hash_alg)                           \</span></div><div class="line"><a name="l00951"></a><span class="lineno">  951</span>&#160;<span class="preprocessor">    (PSA_ALG_DETERMINISTIC_ECDSA_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l00952"></a><span class="lineno">  952</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_ECDSA(alg)                                           \</span></div><div class="line"><a name="l00953"></a><span class="lineno">  953</span>&#160;<span class="preprocessor">    (((alg) &amp; ~PSA_ALG_HASH_MASK &amp; ~PSA_ALG_DSA_DETERMINISTIC_FLAG) ==  \</span></div><div class="line"><a name="l00954"></a><span class="lineno">  954</span>&#160;<span class="preprocessor">     PSA_ALG_ECDSA_BASE)</span></div><div class="line"><a name="l00955"></a><span class="lineno">  955</span>&#160;<span class="preprocessor">#define PSA_ALG_ECDSA_IS_DETERMINISTIC(alg)             \</span></div><div class="line"><a name="l00956"></a><span class="lineno">  956</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_DSA_DETERMINISTIC_FLAG) != 0)</span></div><div class="line"><a name="l00957"></a><span class="lineno">  957</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_DETERMINISTIC_ECDSA(alg)                             \</span></div><div class="line"><a name="l00958"></a><span class="lineno">  958</span>&#160;<span class="preprocessor">    (PSA_ALG_IS_ECDSA(alg) &amp;&amp; PSA_ALG_ECDSA_IS_DETERMINISTIC(alg))</span></div><div class="line"><a name="l00959"></a><span class="lineno">  959</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_RANDOMIZED_ECDSA(alg)                                \</span></div><div class="line"><a name="l00960"></a><span class="lineno">  960</span>&#160;<span class="preprocessor">    (PSA_ALG_IS_ECDSA(alg) &amp;&amp; !PSA_ALG_ECDSA_IS_DETERMINISTIC(alg))</span></div><div class="line"><a name="l00961"></a><span class="lineno">  961</span>&#160;</div><div class="line"><a name="l00980"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga24cf6d7bcd2b9aeeeff86f07b6c674e3">  980</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SIGN_GET_HASH(alg)                                     \</span></div><div class="line"><a name="l00981"></a><span class="lineno">  981</span>&#160;<span class="preprocessor">    (PSA_ALG_IS_RSA_PSS(alg) || PSA_ALG_IS_RSA_PKCS1V15_SIGN(alg) ||   \</span></div><div class="line"><a name="l00982"></a><span class="lineno">  982</span>&#160;<span class="preprocessor">     PSA_ALG_IS_DSA(alg) || PSA_ALG_IS_ECDSA(alg) ?                    \</span></div><div class="line"><a name="l00983"></a><span class="lineno">  983</span>&#160;<span class="preprocessor">     ((alg) &amp; PSA_ALG_HASH_MASK) == 0 ? </span><span class="comment">/*&quot;raw&quot; algorithm*/</span><span class="preprocessor"> 0 :        \</span></div><div class="line"><a name="l00984"></a><span class="lineno">  984</span>&#160;<span class="preprocessor">     ((alg) &amp; PSA_ALG_HASH_MASK) | PSA_ALG_CATEGORY_HASH :             \</span></div><div class="line"><a name="l00985"></a><span class="lineno">  985</span>&#160;<span class="preprocessor">     0)</span></div><div class="line"><a name="l00986"></a><span class="lineno">  986</span>&#160;</div><div class="line"><a name="l00989"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga4c540d3abe43fb9abcb94f2bc51acef9">  989</a></span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_PKCS1V15_CRYPT              ((psa_algorithm_t)0x12020000)</span></div><div class="line"><a name="l00990"></a><span class="lineno">  990</span>&#160;</div><div class="line"><a name="l00991"></a><span class="lineno">  991</span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_OAEP_BASE                   ((psa_algorithm_t)0x12030000)</span></div><div class="line"><a name="l00992"></a><span class="lineno">  992</span>&#160;</div><div class="line"><a name="l01006"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaa1235dc3fdd9839c6c1b1a9857344c76"> 1006</a></span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_OAEP(hash_alg)                              \</span></div><div class="line"><a name="l01007"></a><span class="lineno"> 1007</span>&#160;<span class="preprocessor">    (PSA_ALG_RSA_OAEP_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_RSA_OAEP(alg)                                \</span></div><div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>&#160;<span class="preprocessor">    (((alg) &amp; ~PSA_ALG_HASH_MASK) == PSA_ALG_RSA_OAEP_BASE)</span></div><div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_OAEP_GET_HASH(alg)                          \</span></div><div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>&#160;<span class="preprocessor">    (PSA_ALG_IS_RSA_OAEP(alg) ?                                 \</span></div><div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>&#160;<span class="preprocessor">     ((alg) &amp; PSA_ALG_HASH_MASK) | PSA_ALG_CATEGORY_HASH :      \</span></div><div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>&#160;<span class="preprocessor">     0)</span></div><div class="line"><a name="l01014"></a><span class="lineno"> 1014</span>&#160;</div><div class="line"><a name="l01015"></a><span class="lineno"> 1015</span>&#160;<span class="preprocessor">#define PSA_ALG_HKDF_BASE                       ((psa_algorithm_t)0x30000100)</span></div><div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>&#160;</div><div class="line"><a name="l01027"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga32a888fb360e6e25cab8a343772c4a82"> 1027</a></span>&#160;<span class="preprocessor">#define PSA_ALG_HKDF(hash_alg)                                  \</span></div><div class="line"><a name="l01028"></a><span class="lineno"> 1028</span>&#160;<span class="preprocessor">    (PSA_ALG_HKDF_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01029"></a><span class="lineno"> 1029</span>&#160;</div><div class="line"><a name="l01040"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga1979d0a76fcee6164cf2e65960f38db2"> 1040</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_HKDF(alg)                            \</span></div><div class="line"><a name="l01041"></a><span class="lineno"> 1041</span>&#160;<span class="preprocessor">    (((alg) &amp; ~PSA_ALG_HASH_MASK) == PSA_ALG_HKDF_BASE)</span></div><div class="line"><a name="l01042"></a><span class="lineno"> 1042</span>&#160;<span class="preprocessor">#define PSA_ALG_HKDF_GET_HASH(hkdf_alg)                         \</span></div><div class="line"><a name="l01043"></a><span class="lineno"> 1043</span>&#160;<span class="preprocessor">    (PSA_ALG_CATEGORY_HASH | ((hkdf_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01044"></a><span class="lineno"> 1044</span>&#160;</div><div class="line"><a name="l01080"></a><span class="lineno"> 1080</span>&#160;psa_status_t <a class="code" href="group__key__management.html#gace37363530e2525a2562f07ceec8efb5">psa_import_key</a>(<a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l01081"></a><span class="lineno"> 1081</span>&#160;                            psa_key_type_t type,</div><div class="line"><a name="l01082"></a><span class="lineno"> 1082</span>&#160;                            <span class="keyword">const</span> uint8_t *data,</div><div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>&#160;                            <span class="keywordtype">size_t</span> data_length);</div><div class="line"><a name="l01084"></a><span class="lineno"> 1084</span>&#160;</div><div class="line"><a name="l01118"></a><span class="lineno"> 1118</span>&#160;psa_status_t <a class="code" href="group__key__management.html#ga2e9a60a9525ce6b3082a72df2080f0c5">psa_destroy_key</a>(<a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key);</div><div class="line"><a name="l01119"></a><span class="lineno"> 1119</span>&#160;</div><div class="line"><a name="l01138"></a><span class="lineno"> 1138</span>&#160;psa_status_t <a class="code" href="group__key__management.html#gaf105167657ab1d484cb4a51f93413717">psa_get_key_information</a>(<a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l01139"></a><span class="lineno"> 1139</span>&#160;                                     psa_key_type_t *type,</div><div class="line"><a name="l01140"></a><span class="lineno"> 1140</span>&#160;                                     <span class="keywordtype">size_t</span> *bits);</div><div class="line"><a name="l01141"></a><span class="lineno"> 1141</span>&#160;</div><div class="line"><a name="l01182"></a><span class="lineno"> 1182</span>&#160;psa_status_t <a class="code" href="group__key__management.html#gaa67bc459b20028b268f3d75a05afe022">psa_export_key</a>(<a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l01183"></a><span class="lineno"> 1183</span>&#160;                            uint8_t *data,</div><div class="line"><a name="l01184"></a><span class="lineno"> 1184</span>&#160;                            <span class="keywordtype">size_t</span> data_size,</div><div class="line"><a name="l01185"></a><span class="lineno"> 1185</span>&#160;                            <span class="keywordtype">size_t</span> *data_length);</div><div class="line"><a name="l01186"></a><span class="lineno"> 1186</span>&#160;</div><div class="line"><a name="l01213"></a><span class="lineno"> 1213</span>&#160;psa_status_t <a class="code" href="group__key__management.html#ga7355b38f8eb9330db2786604f4a83a3b">psa_export_public_key</a>(<a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l01214"></a><span class="lineno"> 1214</span>&#160;                                   uint8_t *data,</div><div class="line"><a name="l01215"></a><span class="lineno"> 1215</span>&#160;                                   <span class="keywordtype">size_t</span> data_size,</div><div class="line"><a name="l01216"></a><span class="lineno"> 1216</span>&#160;                                   <span class="keywordtype">size_t</span> *data_length);</div><div class="line"><a name="l01217"></a><span class="lineno"> 1217</span>&#160;</div><div class="line"><a name="l01225"></a><span class="lineno"><a class="line" href="group__policy.html#ga7bb9de71337e0e98de843aa7f9b55f25"> 1225</a></span>&#160;<span class="keyword">typedef</span> uint32_t <a class="code" href="group__policy.html#ga7bb9de71337e0e98de843aa7f9b55f25">psa_key_usage_t</a>;</div><div class="line"><a name="l01226"></a><span class="lineno"> 1226</span>&#160;</div><div class="line"><a name="l01238"></a><span class="lineno"><a class="line" href="group__policy.html#ga7dddccdd1303176e87a4d20c87b589ed"> 1238</a></span>&#160;<span class="preprocessor">#define PSA_KEY_USAGE_EXPORT                    ((psa_key_usage_t)0x00000001)</span></div><div class="line"><a name="l01239"></a><span class="lineno"> 1239</span>&#160;</div><div class="line"><a name="l01249"></a><span class="lineno"><a class="line" href="group__policy.html#ga75153b296d045d529d97203a6a995dad"> 1249</a></span>&#160;<span class="preprocessor">#define PSA_KEY_USAGE_ENCRYPT                   ((psa_key_usage_t)0x00000100)</span></div><div class="line"><a name="l01250"></a><span class="lineno"> 1250</span>&#160;</div><div class="line"><a name="l01260"></a><span class="lineno"><a class="line" href="group__policy.html#gac3f2d2e5983db1edde9f142ca9bf8e6a"> 1260</a></span>&#160;<span class="preprocessor">#define PSA_KEY_USAGE_DECRYPT                   ((psa_key_usage_t)0x00000200)</span></div><div class="line"><a name="l01261"></a><span class="lineno"> 1261</span>&#160;</div><div class="line"><a name="l01270"></a><span class="lineno"><a class="line" href="group__policy.html#ga99b9f456cf59efc4b5579465407aef5a"> 1270</a></span>&#160;<span class="preprocessor">#define PSA_KEY_USAGE_SIGN                      ((psa_key_usage_t)0x00000400)</span></div><div class="line"><a name="l01271"></a><span class="lineno"> 1271</span>&#160;</div><div class="line"><a name="l01280"></a><span class="lineno"><a class="line" href="group__policy.html#ga39b54ffd5958b69634607924fa53cea6"> 1280</a></span>&#160;<span class="preprocessor">#define PSA_KEY_USAGE_VERIFY                    ((psa_key_usage_t)0x00000800)</span></div><div class="line"><a name="l01281"></a><span class="lineno"> 1281</span>&#160;</div><div class="line"><a name="l01284"></a><span class="lineno"><a class="line" href="group__policy.html#gaf19022acc5ef23cf12477f632b48a0b2"> 1284</a></span>&#160;<span class="preprocessor">#define PSA_KEY_USAGE_DERIVE                    ((psa_key_usage_t)0x00001000)</span></div><div class="line"><a name="l01285"></a><span class="lineno"> 1285</span>&#160;</div><div class="line"><a name="l01291"></a><span class="lineno"><a class="line" href="group__policy.html#gaf553efd409845b6d09ff25ce2ba36607"> 1291</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>psa_key_policy_s <a class="code" href="group__policy.html#gaf553efd409845b6d09ff25ce2ba36607">psa_key_policy_t</a>;</div><div class="line"><a name="l01292"></a><span class="lineno"> 1292</span>&#160;</div><div class="line"><a name="l01298"></a><span class="lineno"> 1298</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__policy.html#gad49eb85e3fcbe70f763f511ac83e762e">psa_key_policy_init</a>(<a class="code" href="group__policy.html#gaf553efd409845b6d09ff25ce2ba36607">psa_key_policy_t</a> *policy);</div><div class="line"><a name="l01299"></a><span class="lineno"> 1299</span>&#160;</div><div class="line"><a name="l01310"></a><span class="lineno"> 1310</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__policy.html#gac16792fd6d375a5f76d372090df40607">psa_key_policy_set_usage</a>(<a class="code" href="group__policy.html#gaf553efd409845b6d09ff25ce2ba36607">psa_key_policy_t</a> *policy,</div><div class="line"><a name="l01311"></a><span class="lineno"> 1311</span>&#160;                              psa_key_usage_t usage,</div><div class="line"><a name="l01312"></a><span class="lineno"> 1312</span>&#160;                              psa_algorithm_t alg);</div><div class="line"><a name="l01313"></a><span class="lineno"> 1313</span>&#160;</div><div class="line"><a name="l01320"></a><span class="lineno"> 1320</span>&#160;psa_key_usage_t <a class="code" href="group__policy.html#ga7746662b7503e484774d0ecb5d8ac2ab">psa_key_policy_get_usage</a>(<span class="keyword">const</span> <a class="code" href="group__policy.html#gaf553efd409845b6d09ff25ce2ba36607">psa_key_policy_t</a> *policy);</div><div class="line"><a name="l01321"></a><span class="lineno"> 1321</span>&#160;</div><div class="line"><a name="l01328"></a><span class="lineno"> 1328</span>&#160;psa_algorithm_t <a class="code" href="group__policy.html#gaadf16b89ace53e1d2cb5bcb0aef24c86">psa_key_policy_get_algorithm</a>(<span class="keyword">const</span> <a class="code" href="group__policy.html#gaf553efd409845b6d09ff25ce2ba36607">psa_key_policy_t</a> *policy);</div><div class="line"><a name="l01329"></a><span class="lineno"> 1329</span>&#160;</div><div class="line"><a name="l01350"></a><span class="lineno"> 1350</span>&#160;psa_status_t <a class="code" href="group__policy.html#gad7faa7e64aa771f7441c44ceff21af19">psa_set_key_policy</a>(<a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l01351"></a><span class="lineno"> 1351</span>&#160;                                <span class="keyword">const</span> <a class="code" href="group__policy.html#gaf553efd409845b6d09ff25ce2ba36607">psa_key_policy_t</a> *policy);</div><div class="line"><a name="l01352"></a><span class="lineno"> 1352</span>&#160;</div><div class="line"><a name="l01363"></a><span class="lineno"> 1363</span>&#160;psa_status_t <a class="code" href="group__policy.html#ga613f28712124f9149bd640614376ab5a">psa_get_key_policy</a>(<a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l01364"></a><span class="lineno"> 1364</span>&#160;                                <a class="code" href="group__policy.html#gaf553efd409845b6d09ff25ce2ba36607">psa_key_policy_t</a> *policy);</div><div class="line"><a name="l01365"></a><span class="lineno"> 1365</span>&#160;</div><div class="line"><a name="l01374"></a><span class="lineno"><a class="line" href="group__persistence.html#ga6821ff6dd39dc2bc370ded760ad8b0cf"> 1374</a></span>&#160;<span class="keyword">typedef</span> uint32_t <a class="code" href="group__persistence.html#ga6821ff6dd39dc2bc370ded760ad8b0cf">psa_key_lifetime_t</a>;</div><div class="line"><a name="l01375"></a><span class="lineno"> 1375</span>&#160;</div><div class="line"><a name="l01379"></a><span class="lineno"><a class="line" href="group__persistence.html#ga8b438870ba69489b685730d346455108"> 1379</a></span>&#160;<span class="preprocessor">#define PSA_KEY_LIFETIME_VOLATILE               ((psa_key_lifetime_t)0x00000000)</span></div><div class="line"><a name="l01380"></a><span class="lineno"> 1380</span>&#160;</div><div class="line"><a name="l01384"></a><span class="lineno"><a class="line" href="group__persistence.html#ga3713a01c5fcd5f7eae46ff22ceaf6d02"> 1384</a></span>&#160;<span class="preprocessor">#define PSA_KEY_LIFETIME_PERSISTENT             ((psa_key_lifetime_t)0x00000001)</span></div><div class="line"><a name="l01385"></a><span class="lineno"> 1385</span>&#160;</div><div class="line"><a name="l01389"></a><span class="lineno"><a class="line" href="group__persistence.html#gae6b8443238ef1900cf132550d7df557f"> 1389</a></span>&#160;<span class="preprocessor">#define PSA_KEY_LIFETIME_WRITE_ONCE             ((psa_key_lifetime_t)0x7fffffff)</span></div><div class="line"><a name="l01390"></a><span class="lineno"> 1390</span>&#160;</div><div class="line"><a name="l01406"></a><span class="lineno"> 1406</span>&#160;psa_status_t <a class="code" href="group__persistence.html#gaf0daaa1dba14dc324ca83dfe1495a5e2">psa_get_key_lifetime</a>(<a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l01407"></a><span class="lineno"> 1407</span>&#160;                                  psa_key_lifetime_t *lifetime);</div><div class="line"><a name="l01408"></a><span class="lineno"> 1408</span>&#160;</div><div class="line"><a name="l01433"></a><span class="lineno"> 1433</span>&#160;psa_status_t <a class="code" href="group__persistence.html#ga1bd1ee6d00ebd9962fc6ad72cbd22ef8">psa_set_key_lifetime</a>(<a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l01434"></a><span class="lineno"> 1434</span>&#160;                                  psa_key_lifetime_t lifetime);</div><div class="line"><a name="l01435"></a><span class="lineno"> 1435</span>&#160;</div><div class="line"><a name="l01447"></a><span class="lineno"><a class="line" href="group__hash.html#ga3c4205d2ce66c4095fc5c78c25273fab"> 1447</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>psa_hash_operation_s <a class="code" href="group__hash.html#ga3c4205d2ce66c4095fc5c78c25273fab">psa_hash_operation_t</a>;</div><div class="line"><a name="l01448"></a><span class="lineno"> 1448</span>&#160;</div><div class="line"><a name="l01463"></a><span class="lineno"><a class="line" href="group__hash.html#gaef340331ce3cba2b57e1fc5624bf1f99"> 1463</a></span>&#160;<span class="preprocessor">#define PSA_HASH_SIZE(alg)                                      \</span></div><div class="line"><a name="l01464"></a><span class="lineno"> 1464</span>&#160;<span class="preprocessor">    (                                                           \</span></div><div class="line"><a name="l01465"></a><span class="lineno"> 1465</span>&#160;<span class="preprocessor">        PSA_ALG_HMAC_HASH(alg) == PSA_ALG_MD2 ? 16 :            \</span></div><div class="line"><a name="l01466"></a><span class="lineno"> 1466</span>&#160;<span class="preprocessor">        PSA_ALG_HMAC_HASH(alg) == PSA_ALG_MD4 ? 16 :            \</span></div><div class="line"><a name="l01467"></a><span class="lineno"> 1467</span>&#160;<span class="preprocessor">        PSA_ALG_HMAC_HASH(alg) == PSA_ALG_MD5 ? 16 :            \</span></div><div class="line"><a name="l01468"></a><span class="lineno"> 1468</span>&#160;<span class="preprocessor">        PSA_ALG_HMAC_HASH(alg) == PSA_ALG_RIPEMD160 ? 20 :      \</span></div><div class="line"><a name="l01469"></a><span class="lineno"> 1469</span>&#160;<span class="preprocessor">        PSA_ALG_HMAC_HASH(alg) == PSA_ALG_SHA_1 ? 20 :          \</span></div><div class="line"><a name="l01470"></a><span class="lineno"> 1470</span>&#160;<span class="preprocessor">        PSA_ALG_HMAC_HASH(alg) == PSA_ALG_SHA_224 ? 28 :        \</span></div><div class="line"><a name="l01471"></a><span class="lineno"> 1471</span>&#160;<span class="preprocessor">        PSA_ALG_HMAC_HASH(alg) == PSA_ALG_SHA_256 ? 32 :        \</span></div><div class="line"><a name="l01472"></a><span class="lineno"> 1472</span>&#160;<span class="preprocessor">        PSA_ALG_HMAC_HASH(alg) == PSA_ALG_SHA_384 ? 48 :        \</span></div><div class="line"><a name="l01473"></a><span class="lineno"> 1473</span>&#160;<span class="preprocessor">        PSA_ALG_HMAC_HASH(alg) == PSA_ALG_SHA_512 ? 64 :        \</span></div><div class="line"><a name="l01474"></a><span class="lineno"> 1474</span>&#160;<span class="preprocessor">        PSA_ALG_HMAC_HASH(alg) == PSA_ALG_SHA_512_224 ? 28 :    \</span></div><div class="line"><a name="l01475"></a><span class="lineno"> 1475</span>&#160;<span class="preprocessor">        PSA_ALG_HMAC_HASH(alg) == PSA_ALG_SHA_512_256 ? 32 :    \</span></div><div class="line"><a name="l01476"></a><span class="lineno"> 1476</span>&#160;<span class="preprocessor">        PSA_ALG_HMAC_HASH(alg) == PSA_ALG_SHA3_224 ? 28 :       \</span></div><div class="line"><a name="l01477"></a><span class="lineno"> 1477</span>&#160;<span class="preprocessor">        PSA_ALG_HMAC_HASH(alg) == PSA_ALG_SHA3_256 ? 32 :       \</span></div><div class="line"><a name="l01478"></a><span class="lineno"> 1478</span>&#160;<span class="preprocessor">        PSA_ALG_HMAC_HASH(alg) == PSA_ALG_SHA3_384 ? 48 :       \</span></div><div class="line"><a name="l01479"></a><span class="lineno"> 1479</span>&#160;<span class="preprocessor">        PSA_ALG_HMAC_HASH(alg) == PSA_ALG_SHA3_512 ? 64 :       \</span></div><div class="line"><a name="l01480"></a><span class="lineno"> 1480</span>&#160;<span class="preprocessor">        0)</span></div><div class="line"><a name="l01481"></a><span class="lineno"> 1481</span>&#160;</div><div class="line"><a name="l01517"></a><span class="lineno"> 1517</span>&#160;psa_status_t <a class="code" href="group__hash.html#ga8d72896cf70fc4d514c5c6b978912515">psa_hash_setup</a>(<a class="code" href="group__hash.html#ga3c4205d2ce66c4095fc5c78c25273fab">psa_hash_operation_t</a> *operation,</div><div class="line"><a name="l01518"></a><span class="lineno"> 1518</span>&#160;                            psa_algorithm_t alg);</div><div class="line"><a name="l01519"></a><span class="lineno"> 1519</span>&#160;</div><div class="line"><a name="l01539"></a><span class="lineno"> 1539</span>&#160;psa_status_t <a class="code" href="group__hash.html#ga65b16ef97d7f650899b7db4b7d1112ff">psa_hash_update</a>(<a class="code" href="group__hash.html#ga3c4205d2ce66c4095fc5c78c25273fab">psa_hash_operation_t</a> *operation,</div><div class="line"><a name="l01540"></a><span class="lineno"> 1540</span>&#160;                             <span class="keyword">const</span> uint8_t *input,</div><div class="line"><a name="l01541"></a><span class="lineno"> 1541</span>&#160;                             <span class="keywordtype">size_t</span> input_length);</div><div class="line"><a name="l01542"></a><span class="lineno"> 1542</span>&#160;</div><div class="line"><a name="l01580"></a><span class="lineno"> 1580</span>&#160;psa_status_t <a class="code" href="group__hash.html#ga4795fd06a0067b0adcd92e9627b8c97e">psa_hash_finish</a>(<a class="code" href="group__hash.html#ga3c4205d2ce66c4095fc5c78c25273fab">psa_hash_operation_t</a> *operation,</div><div class="line"><a name="l01581"></a><span class="lineno"> 1581</span>&#160;                             uint8_t *hash,</div><div class="line"><a name="l01582"></a><span class="lineno"> 1582</span>&#160;                             <span class="keywordtype">size_t</span> hash_size,</div><div class="line"><a name="l01583"></a><span class="lineno"> 1583</span>&#160;                             <span class="keywordtype">size_t</span> *hash_length);</div><div class="line"><a name="l01584"></a><span class="lineno"> 1584</span>&#160;</div><div class="line"><a name="l01616"></a><span class="lineno"> 1616</span>&#160;psa_status_t <a class="code" href="group__hash.html#ga7be923c5700c9c70ef77ee9b76d1a5c0">psa_hash_verify</a>(<a class="code" href="group__hash.html#ga3c4205d2ce66c4095fc5c78c25273fab">psa_hash_operation_t</a> *operation,</div><div class="line"><a name="l01617"></a><span class="lineno"> 1617</span>&#160;                             <span class="keyword">const</span> uint8_t *hash,</div><div class="line"><a name="l01618"></a><span class="lineno"> 1618</span>&#160;                             <span class="keywordtype">size_t</span> hash_length);</div><div class="line"><a name="l01619"></a><span class="lineno"> 1619</span>&#160;</div><div class="line"><a name="l01647"></a><span class="lineno"> 1647</span>&#160;psa_status_t <a class="code" href="group__hash.html#gab0b4d5f9912a615559497a467b532928">psa_hash_abort</a>(<a class="code" href="group__hash.html#ga3c4205d2ce66c4095fc5c78c25273fab">psa_hash_operation_t</a> *operation);</div><div class="line"><a name="l01648"></a><span class="lineno"> 1648</span>&#160;</div><div class="line"><a name="l01660"></a><span class="lineno"><a class="line" href="group__MAC.html#ga78f0838b0c4e3db28b26355624d4bd37"> 1660</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>psa_mac_operation_s <a class="code" href="group__MAC.html#ga78f0838b0c4e3db28b26355624d4bd37">psa_mac_operation_t</a>;</div><div class="line"><a name="l01661"></a><span class="lineno"> 1661</span>&#160;</div><div class="line"><a name="l01707"></a><span class="lineno"> 1707</span>&#160;psa_status_t <a class="code" href="group__MAC.html#ga68ac2ad3253e9e27fcfbc788a4df8177">psa_mac_sign_setup</a>(<a class="code" href="group__MAC.html#ga78f0838b0c4e3db28b26355624d4bd37">psa_mac_operation_t</a> *operation,</div><div class="line"><a name="l01708"></a><span class="lineno"> 1708</span>&#160;                                <a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l01709"></a><span class="lineno"> 1709</span>&#160;                                psa_algorithm_t alg);</div><div class="line"><a name="l01710"></a><span class="lineno"> 1710</span>&#160;</div><div class="line"><a name="l01755"></a><span class="lineno"> 1755</span>&#160;psa_status_t <a class="code" href="group__MAC.html#gac7d1c3d075ce1604a54cbbc9933fa39d">psa_mac_verify_setup</a>(<a class="code" href="group__MAC.html#ga78f0838b0c4e3db28b26355624d4bd37">psa_mac_operation_t</a> *operation,</div><div class="line"><a name="l01756"></a><span class="lineno"> 1756</span>&#160;                                  <a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l01757"></a><span class="lineno"> 1757</span>&#160;                                  psa_algorithm_t alg);</div><div class="line"><a name="l01758"></a><span class="lineno"> 1758</span>&#160;</div><div class="line"><a name="l01780"></a><span class="lineno"> 1780</span>&#160;psa_status_t <a class="code" href="group__MAC.html#ga5560af371497babefe03c9da4e8a1c05">psa_mac_update</a>(<a class="code" href="group__MAC.html#ga78f0838b0c4e3db28b26355624d4bd37">psa_mac_operation_t</a> *operation,</div><div class="line"><a name="l01781"></a><span class="lineno"> 1781</span>&#160;                            <span class="keyword">const</span> uint8_t *input,</div><div class="line"><a name="l01782"></a><span class="lineno"> 1782</span>&#160;                            <span class="keywordtype">size_t</span> input_length);</div><div class="line"><a name="l01783"></a><span class="lineno"> 1783</span>&#160;</div><div class="line"><a name="l01822"></a><span class="lineno"> 1822</span>&#160;psa_status_t <a class="code" href="group__MAC.html#gac22bc0125580c96724a09226cfbc97f2">psa_mac_sign_finish</a>(<a class="code" href="group__MAC.html#ga78f0838b0c4e3db28b26355624d4bd37">psa_mac_operation_t</a> *operation,</div><div class="line"><a name="l01823"></a><span class="lineno"> 1823</span>&#160;                                 uint8_t *mac,</div><div class="line"><a name="l01824"></a><span class="lineno"> 1824</span>&#160;                                 <span class="keywordtype">size_t</span> mac_size,</div><div class="line"><a name="l01825"></a><span class="lineno"> 1825</span>&#160;                                 <span class="keywordtype">size_t</span> *mac_length);</div><div class="line"><a name="l01826"></a><span class="lineno"> 1826</span>&#160;</div><div class="line"><a name="l01858"></a><span class="lineno"> 1858</span>&#160;psa_status_t <a class="code" href="group__MAC.html#gac92b2930d6728e1be4d011c05d485822">psa_mac_verify_finish</a>(<a class="code" href="group__MAC.html#ga78f0838b0c4e3db28b26355624d4bd37">psa_mac_operation_t</a> *operation,</div><div class="line"><a name="l01859"></a><span class="lineno"> 1859</span>&#160;                                   <span class="keyword">const</span> uint8_t *mac,</div><div class="line"><a name="l01860"></a><span class="lineno"> 1860</span>&#160;                                   <span class="keywordtype">size_t</span> mac_length);</div><div class="line"><a name="l01861"></a><span class="lineno"> 1861</span>&#160;</div><div class="line"><a name="l01890"></a><span class="lineno"> 1890</span>&#160;psa_status_t <a class="code" href="group__MAC.html#gacd8dd54855ba1bc0a03f104f252884fd">psa_mac_abort</a>(<a class="code" href="group__MAC.html#ga78f0838b0c4e3db28b26355624d4bd37">psa_mac_operation_t</a> *operation);</div><div class="line"><a name="l01891"></a><span class="lineno"> 1891</span>&#160;</div><div class="line"><a name="l01903"></a><span class="lineno"><a class="line" href="group__cipher.html#ga1399de29db657e3737bb09927aae51fa"> 1903</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>psa_cipher_operation_s <a class="code" href="group__cipher.html#ga1399de29db657e3737bb09927aae51fa">psa_cipher_operation_t</a>;</div><div class="line"><a name="l01904"></a><span class="lineno"> 1904</span>&#160;</div><div class="line"><a name="l01951"></a><span class="lineno"> 1951</span>&#160;psa_status_t <a class="code" href="group__cipher.html#ga735c9d51b820e1d4cb45f2406ebfae98">psa_cipher_encrypt_setup</a>(<a class="code" href="group__cipher.html#ga1399de29db657e3737bb09927aae51fa">psa_cipher_operation_t</a> *operation,</div><div class="line"><a name="l01952"></a><span class="lineno"> 1952</span>&#160;                                      <a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l01953"></a><span class="lineno"> 1953</span>&#160;                                      psa_algorithm_t alg);</div><div class="line"><a name="l01954"></a><span class="lineno"> 1954</span>&#160;</div><div class="line"><a name="l02000"></a><span class="lineno"> 2000</span>&#160;psa_status_t <a class="code" href="group__cipher.html#ga8ce1efaa648d7e0dd00e878d655d2950">psa_cipher_decrypt_setup</a>(<a class="code" href="group__cipher.html#ga1399de29db657e3737bb09927aae51fa">psa_cipher_operation_t</a> *operation,</div><div class="line"><a name="l02001"></a><span class="lineno"> 2001</span>&#160;                                      <a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l02002"></a><span class="lineno"> 2002</span>&#160;                                      psa_algorithm_t alg);</div><div class="line"><a name="l02003"></a><span class="lineno"> 2003</span>&#160;</div><div class="line"><a name="l02032"></a><span class="lineno"> 2032</span>&#160;psa_status_t <a class="code" href="group__cipher.html#ga44857cf5e0c3d134a3c560f8ff5b50aa">psa_cipher_generate_iv</a>(<a class="code" href="group__cipher.html#ga1399de29db657e3737bb09927aae51fa">psa_cipher_operation_t</a> *operation,</div><div class="line"><a name="l02033"></a><span class="lineno"> 2033</span>&#160;                                    <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *iv,</div><div class="line"><a name="l02034"></a><span class="lineno"> 2034</span>&#160;                                    <span class="keywordtype">size_t</span> iv_size,</div><div class="line"><a name="l02035"></a><span class="lineno"> 2035</span>&#160;                                    <span class="keywordtype">size_t</span> *iv_length);</div><div class="line"><a name="l02036"></a><span class="lineno"> 2036</span>&#160;</div><div class="line"><a name="l02067"></a><span class="lineno"> 2067</span>&#160;psa_status_t <a class="code" href="group__cipher.html#ga1359b2101f31637496ce7cc36c6e3d42">psa_cipher_set_iv</a>(<a class="code" href="group__cipher.html#ga1399de29db657e3737bb09927aae51fa">psa_cipher_operation_t</a> *operation,</div><div class="line"><a name="l02068"></a><span class="lineno"> 2068</span>&#160;                               <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *iv,</div><div class="line"><a name="l02069"></a><span class="lineno"> 2069</span>&#160;                               <span class="keywordtype">size_t</span> iv_length);</div><div class="line"><a name="l02070"></a><span class="lineno"> 2070</span>&#160;</div><div class="line"><a name="l02103"></a><span class="lineno"> 2103</span>&#160;psa_status_t <a class="code" href="group__cipher.html#gafd0caea99cf1052527e4089d37f5ab91">psa_cipher_update</a>(<a class="code" href="group__cipher.html#ga1399de29db657e3737bb09927aae51fa">psa_cipher_operation_t</a> *operation,</div><div class="line"><a name="l02104"></a><span class="lineno"> 2104</span>&#160;                               <span class="keyword">const</span> uint8_t *input,</div><div class="line"><a name="l02105"></a><span class="lineno"> 2105</span>&#160;                               <span class="keywordtype">size_t</span> input_length,</div><div class="line"><a name="l02106"></a><span class="lineno"> 2106</span>&#160;                               <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *output,</div><div class="line"><a name="l02107"></a><span class="lineno"> 2107</span>&#160;                               <span class="keywordtype">size_t</span> output_size,</div><div class="line"><a name="l02108"></a><span class="lineno"> 2108</span>&#160;                               <span class="keywordtype">size_t</span> *output_length);</div><div class="line"><a name="l02109"></a><span class="lineno"> 2109</span>&#160;</div><div class="line"><a name="l02141"></a><span class="lineno"> 2141</span>&#160;psa_status_t <a class="code" href="group__cipher.html#ga1dcb58b8befe23f8a4d7a1d49c99249b">psa_cipher_finish</a>(<a class="code" href="group__cipher.html#ga1399de29db657e3737bb09927aae51fa">psa_cipher_operation_t</a> *operation,</div><div class="line"><a name="l02142"></a><span class="lineno"> 2142</span>&#160;                               uint8_t *output,</div><div class="line"><a name="l02143"></a><span class="lineno"> 2143</span>&#160;                               <span class="keywordtype">size_t</span> output_size,</div><div class="line"><a name="l02144"></a><span class="lineno"> 2144</span>&#160;                               <span class="keywordtype">size_t</span> *output_length);</div><div class="line"><a name="l02145"></a><span class="lineno"> 2145</span>&#160;</div><div class="line"><a name="l02174"></a><span class="lineno"> 2174</span>&#160;psa_status_t <a class="code" href="group__cipher.html#gaad482cdca2098bca0620596aaa02eaa4">psa_cipher_abort</a>(<a class="code" href="group__cipher.html#ga1399de29db657e3737bb09927aae51fa">psa_cipher_operation_t</a> *operation);</div><div class="line"><a name="l02175"></a><span class="lineno"> 2175</span>&#160;</div><div class="line"><a name="l02197"></a><span class="lineno"><a class="line" href="group__aead.html#ga337ef01fe3c9f71d62ccced33e8917f4"> 2197</a></span>&#160;<span class="preprocessor">#define PSA_AEAD_TAG_SIZE(alg)             \</span></div><div class="line"><a name="l02198"></a><span class="lineno"> 2198</span>&#160;<span class="preprocessor">    ((alg) == PSA_ALG_GCM ? 16 :           \</span></div><div class="line"><a name="l02199"></a><span class="lineno"> 2199</span>&#160;<span class="preprocessor">     (alg) == PSA_ALG_CCM ? 16 :           \</span></div><div class="line"><a name="l02200"></a><span class="lineno"> 2200</span>&#160;<span class="preprocessor">     0)</span></div><div class="line"><a name="l02201"></a><span class="lineno"> 2201</span>&#160;</div><div class="line"><a name="l02243"></a><span class="lineno"> 2243</span>&#160;psa_status_t <a class="code" href="group__aead.html#ga14e4068a3d328515a4884f3037904d54">psa_aead_encrypt</a>(<a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l02244"></a><span class="lineno"> 2244</span>&#160;                              psa_algorithm_t alg,</div><div class="line"><a name="l02245"></a><span class="lineno"> 2245</span>&#160;                              <span class="keyword">const</span> uint8_t *nonce,</div><div class="line"><a name="l02246"></a><span class="lineno"> 2246</span>&#160;                              <span class="keywordtype">size_t</span> nonce_length,</div><div class="line"><a name="l02247"></a><span class="lineno"> 2247</span>&#160;                              <span class="keyword">const</span> uint8_t *additional_data,</div><div class="line"><a name="l02248"></a><span class="lineno"> 2248</span>&#160;                              <span class="keywordtype">size_t</span> additional_data_length,</div><div class="line"><a name="l02249"></a><span class="lineno"> 2249</span>&#160;                              <span class="keyword">const</span> uint8_t *plaintext,</div><div class="line"><a name="l02250"></a><span class="lineno"> 2250</span>&#160;                              <span class="keywordtype">size_t</span> plaintext_length,</div><div class="line"><a name="l02251"></a><span class="lineno"> 2251</span>&#160;                              uint8_t *ciphertext,</div><div class="line"><a name="l02252"></a><span class="lineno"> 2252</span>&#160;                              <span class="keywordtype">size_t</span> ciphertext_size,</div><div class="line"><a name="l02253"></a><span class="lineno"> 2253</span>&#160;                              <span class="keywordtype">size_t</span> *ciphertext_length);</div><div class="line"><a name="l02254"></a><span class="lineno"> 2254</span>&#160;</div><div class="line"><a name="l02296"></a><span class="lineno"> 2296</span>&#160;psa_status_t <a class="code" href="group__aead.html#ga5b88ad2cfbf2e98039858416fa3ebd7a">psa_aead_decrypt</a>(<a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l02297"></a><span class="lineno"> 2297</span>&#160;                              psa_algorithm_t alg,</div><div class="line"><a name="l02298"></a><span class="lineno"> 2298</span>&#160;                              <span class="keyword">const</span> uint8_t *nonce,</div><div class="line"><a name="l02299"></a><span class="lineno"> 2299</span>&#160;                              <span class="keywordtype">size_t</span> nonce_length,</div><div class="line"><a name="l02300"></a><span class="lineno"> 2300</span>&#160;                              <span class="keyword">const</span> uint8_t *additional_data,</div><div class="line"><a name="l02301"></a><span class="lineno"> 2301</span>&#160;                              <span class="keywordtype">size_t</span> additional_data_length,</div><div class="line"><a name="l02302"></a><span class="lineno"> 2302</span>&#160;                              <span class="keyword">const</span> uint8_t *ciphertext,</div><div class="line"><a name="l02303"></a><span class="lineno"> 2303</span>&#160;                              <span class="keywordtype">size_t</span> ciphertext_length,</div><div class="line"><a name="l02304"></a><span class="lineno"> 2304</span>&#160;                              uint8_t *plaintext,</div><div class="line"><a name="l02305"></a><span class="lineno"> 2305</span>&#160;                              <span class="keywordtype">size_t</span> plaintext_size,</div><div class="line"><a name="l02306"></a><span class="lineno"> 2306</span>&#160;                              <span class="keywordtype">size_t</span> *plaintext_length);</div><div class="line"><a name="l02307"></a><span class="lineno"> 2307</span>&#160;</div><div class="line"><a name="l02322"></a><span class="lineno"><a class="line" href="group__asymmetric.html#ga10c472a35f04051add6b20cc228ffc11"> 2322</a></span>&#160;<span class="preprocessor">#define PSA_ECDSA_SIGNATURE_SIZE(curve_bits)    \</span></div><div class="line"><a name="l02323"></a><span class="lineno"> 2323</span>&#160;<span class="preprocessor">    (PSA_BITS_TO_BYTES(curve_bits) * 2)</span></div><div class="line"><a name="l02324"></a><span class="lineno"> 2324</span>&#160;</div><div class="line"><a name="l02359"></a><span class="lineno"> 2359</span>&#160;psa_status_t <a class="code" href="group__asymmetric.html#ga48091460d1ead078d93caa3611aec976">psa_asymmetric_sign</a>(<a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l02360"></a><span class="lineno"> 2360</span>&#160;                                 psa_algorithm_t alg,</div><div class="line"><a name="l02361"></a><span class="lineno"> 2361</span>&#160;                                 <span class="keyword">const</span> uint8_t *hash,</div><div class="line"><a name="l02362"></a><span class="lineno"> 2362</span>&#160;                                 <span class="keywordtype">size_t</span> hash_length,</div><div class="line"><a name="l02363"></a><span class="lineno"> 2363</span>&#160;                                 uint8_t *signature,</div><div class="line"><a name="l02364"></a><span class="lineno"> 2364</span>&#160;                                 <span class="keywordtype">size_t</span> signature_size,</div><div class="line"><a name="l02365"></a><span class="lineno"> 2365</span>&#160;                                 <span class="keywordtype">size_t</span> *signature_length);</div><div class="line"><a name="l02366"></a><span class="lineno"> 2366</span>&#160;</div><div class="line"><a name="l02398"></a><span class="lineno"> 2398</span>&#160;psa_status_t <a class="code" href="group__asymmetric.html#gaee3e92946c1c4b3dfa90879e2f7d1321">psa_asymmetric_verify</a>(<a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l02399"></a><span class="lineno"> 2399</span>&#160;                                   psa_algorithm_t alg,</div><div class="line"><a name="l02400"></a><span class="lineno"> 2400</span>&#160;                                   <span class="keyword">const</span> uint8_t *hash,</div><div class="line"><a name="l02401"></a><span class="lineno"> 2401</span>&#160;                                   <span class="keywordtype">size_t</span> hash_length,</div><div class="line"><a name="l02402"></a><span class="lineno"> 2402</span>&#160;                                   <span class="keyword">const</span> uint8_t *signature,</div><div class="line"><a name="l02403"></a><span class="lineno"> 2403</span>&#160;                                   <span class="keywordtype">size_t</span> signature_length);</div><div class="line"><a name="l02404"></a><span class="lineno"> 2404</span>&#160;</div><div class="line"><a name="l02405"></a><span class="lineno"> 2405</span>&#160;<span class="preprocessor">#define PSA_RSA_MINIMUM_PADDING_SIZE(alg)                               \</span></div><div class="line"><a name="l02406"></a><span class="lineno"> 2406</span>&#160;<span class="preprocessor">    (PSA_ALG_IS_RSA_OAEP(alg) ?                                         \</span></div><div class="line"><a name="l02407"></a><span class="lineno"> 2407</span>&#160;<span class="preprocessor">     2 * PSA_HASH_FINAL_SIZE(PSA_ALG_RSA_OAEP_GET_HASH(alg)) + 1 :      \</span></div><div class="line"><a name="l02408"></a><span class="lineno"> 2408</span>&#160;<span class="preprocessor">     11 </span><span class="comment">/*PKCS#1v1.5*/</span><span class="preprocessor">)</span></div><div class="line"><a name="l02409"></a><span class="lineno"> 2409</span>&#160;</div><div class="line"><a name="l02452"></a><span class="lineno"> 2452</span>&#160;psa_status_t <a class="code" href="group__asymmetric.html#ga3c0ba402bac217d623dba8320c2240c2">psa_asymmetric_encrypt</a>(<a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l02453"></a><span class="lineno"> 2453</span>&#160;                                    psa_algorithm_t alg,</div><div class="line"><a name="l02454"></a><span class="lineno"> 2454</span>&#160;                                    <span class="keyword">const</span> uint8_t *input,</div><div class="line"><a name="l02455"></a><span class="lineno"> 2455</span>&#160;                                    <span class="keywordtype">size_t</span> input_length,</div><div class="line"><a name="l02456"></a><span class="lineno"> 2456</span>&#160;                                    <span class="keyword">const</span> uint8_t *salt,</div><div class="line"><a name="l02457"></a><span class="lineno"> 2457</span>&#160;                                    <span class="keywordtype">size_t</span> salt_length,</div><div class="line"><a name="l02458"></a><span class="lineno"> 2458</span>&#160;                                    uint8_t *output,</div><div class="line"><a name="l02459"></a><span class="lineno"> 2459</span>&#160;                                    <span class="keywordtype">size_t</span> output_size,</div><div class="line"><a name="l02460"></a><span class="lineno"> 2460</span>&#160;                                    <span class="keywordtype">size_t</span> *output_length);</div><div class="line"><a name="l02461"></a><span class="lineno"> 2461</span>&#160;</div><div class="line"><a name="l02504"></a><span class="lineno"> 2504</span>&#160;psa_status_t <a class="code" href="group__asymmetric.html#ga3094be979f37aa2865c283167ba907e6">psa_asymmetric_decrypt</a>(<a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l02505"></a><span class="lineno"> 2505</span>&#160;                                    psa_algorithm_t alg,</div><div class="line"><a name="l02506"></a><span class="lineno"> 2506</span>&#160;                                    <span class="keyword">const</span> uint8_t *input,</div><div class="line"><a name="l02507"></a><span class="lineno"> 2507</span>&#160;                                    <span class="keywordtype">size_t</span> input_length,</div><div class="line"><a name="l02508"></a><span class="lineno"> 2508</span>&#160;                                    <span class="keyword">const</span> uint8_t *salt,</div><div class="line"><a name="l02509"></a><span class="lineno"> 2509</span>&#160;                                    <span class="keywordtype">size_t</span> salt_length,</div><div class="line"><a name="l02510"></a><span class="lineno"> 2510</span>&#160;                                    uint8_t *output,</div><div class="line"><a name="l02511"></a><span class="lineno"> 2511</span>&#160;                                    <span class="keywordtype">size_t</span> output_size,</div><div class="line"><a name="l02512"></a><span class="lineno"> 2512</span>&#160;                                    <span class="keywordtype">size_t</span> *output_length);</div><div class="line"><a name="l02513"></a><span class="lineno"> 2513</span>&#160;</div><div class="line"><a name="l02549"></a><span class="lineno"><a class="line" href="group__generators.html#ga1f894c4fba202ef8e307d72caf489e3b"> 2549</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>psa_crypto_generator_s <a class="code" href="group__generators.html#ga1f894c4fba202ef8e307d72caf489e3b">psa_crypto_generator_t</a>;</div><div class="line"><a name="l02550"></a><span class="lineno"> 2550</span>&#160;</div><div class="line"><a name="l02556"></a><span class="lineno"> 2556</span>&#160;<span class="preprocessor">#ifdef __DOXYGEN_ONLY__</span></div><div class="line"><a name="l02557"></a><span class="lineno"> 2557</span>&#160;<span class="comment">/* This is an example definition for documentation purposes.</span></div><div class="line"><a name="l02558"></a><span class="lineno"> 2558</span>&#160;<span class="comment"> * Implementations should define a suitable value in `crypto_struct.h`.</span></div><div class="line"><a name="l02559"></a><span class="lineno"> 2559</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02560"></a><span class="lineno"><a class="line" href="group__generators.html#ga4788b471385fc667876fbd8a0d3fe062"> 2560</a></span>&#160;<span class="preprocessor">#define PSA_CRYPTO_GENERATOR_INIT {0}</span></div><div class="line"><a name="l02561"></a><span class="lineno"> 2561</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l02562"></a><span class="lineno"> 2562</span>&#160;</div><div class="line"><a name="l02565"></a><span class="lineno"> 2565</span>&#160;<span class="keyword">static</span> <a class="code" href="group__generators.html#ga1f894c4fba202ef8e307d72caf489e3b">psa_crypto_generator_t</a> psa_crypto_generator_init(<span class="keywordtype">void</span>);</div><div class="line"><a name="l02566"></a><span class="lineno"> 2566</span>&#160;</div><div class="line"><a name="l02579"></a><span class="lineno"> 2579</span>&#160;psa_status_t <a class="code" href="group__generators.html#ga7453491e3b440193be2c5dccc2040fd2">psa_get_generator_capacity</a>(<span class="keyword">const</span> <a class="code" href="group__generators.html#ga1f894c4fba202ef8e307d72caf489e3b">psa_crypto_generator_t</a> *generator,</div><div class="line"><a name="l02580"></a><span class="lineno"> 2580</span>&#160;                                        <span class="keywordtype">size_t</span> *capacity);</div><div class="line"><a name="l02581"></a><span class="lineno"> 2581</span>&#160;</div><div class="line"><a name="l02607"></a><span class="lineno"> 2607</span>&#160;psa_status_t <a class="code" href="group__generators.html#gab5712ad29b78c2b170e64cc5bcfc1bce">psa_generator_read</a>(<a class="code" href="group__generators.html#ga1f894c4fba202ef8e307d72caf489e3b">psa_crypto_generator_t</a> *generator,</div><div class="line"><a name="l02608"></a><span class="lineno"> 2608</span>&#160;                                uint8_t *output,</div><div class="line"><a name="l02609"></a><span class="lineno"> 2609</span>&#160;                                <span class="keywordtype">size_t</span> output_length);</div><div class="line"><a name="l02610"></a><span class="lineno"> 2610</span>&#160;</div><div class="line"><a name="l02654"></a><span class="lineno"> 2654</span>&#160;psa_status_t <a class="code" href="group__generators.html#ga06c1ba3d989827d909b4b01ffe983beb">psa_generator_import_key</a>(<a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l02655"></a><span class="lineno"> 2655</span>&#160;                                      psa_key_type_t type,</div><div class="line"><a name="l02656"></a><span class="lineno"> 2656</span>&#160;                                      <span class="keywordtype">size_t</span> bits,</div><div class="line"><a name="l02657"></a><span class="lineno"> 2657</span>&#160;                                      <a class="code" href="group__generators.html#ga1f894c4fba202ef8e307d72caf489e3b">psa_crypto_generator_t</a> *generator);</div><div class="line"><a name="l02658"></a><span class="lineno"> 2658</span>&#160;</div><div class="line"><a name="l02681"></a><span class="lineno"> 2681</span>&#160;psa_status_t <a class="code" href="group__generators.html#ga563ca64537d90368899286b36d8cf7f3">psa_generator_abort</a>(<a class="code" href="group__generators.html#ga1f894c4fba202ef8e307d72caf489e3b">psa_crypto_generator_t</a> *generator);</div><div class="line"><a name="l02682"></a><span class="lineno"> 2682</span>&#160;</div><div class="line"><a name="l02727"></a><span class="lineno"> 2727</span>&#160;psa_status_t <a class="code" href="group__derivation.html#ga1b6429f443a45e5f3209043abbbe8315">psa_key_derivation</a>(<a class="code" href="group__generators.html#ga1f894c4fba202ef8e307d72caf489e3b">psa_crypto_generator_t</a> *generator,</div><div class="line"><a name="l02728"></a><span class="lineno"> 2728</span>&#160;                                <a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l02729"></a><span class="lineno"> 2729</span>&#160;                                psa_algorithm_t alg,</div><div class="line"><a name="l02730"></a><span class="lineno"> 2730</span>&#160;                                <span class="keyword">const</span> uint8_t *salt,</div><div class="line"><a name="l02731"></a><span class="lineno"> 2731</span>&#160;                                <span class="keywordtype">size_t</span> salt_length,</div><div class="line"><a name="l02732"></a><span class="lineno"> 2732</span>&#160;                                <span class="keyword">const</span> uint8_t *label,</div><div class="line"><a name="l02733"></a><span class="lineno"> 2733</span>&#160;                                <span class="keywordtype">size_t</span> label_length,</div><div class="line"><a name="l02734"></a><span class="lineno"> 2734</span>&#160;                                <span class="keywordtype">size_t</span> capacity);</div><div class="line"><a name="l02735"></a><span class="lineno"> 2735</span>&#160;</div><div class="line"><a name="l02761"></a><span class="lineno"> 2761</span>&#160;psa_status_t <a class="code" href="group__random.html#ga1985eae417dfbccedf50d5fff54ea8c5">psa_generate_random</a>(uint8_t *output,</div><div class="line"><a name="l02762"></a><span class="lineno"> 2762</span>&#160;                                 <span class="keywordtype">size_t</span> output_size);</div><div class="line"><a name="l02763"></a><span class="lineno"> 2763</span>&#160;</div><div class="line"><a name="l02769"></a><span class="lineno"><a class="line" href="structpsa__generate__key__extra__rsa.html"> 2769</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>{</div><div class="line"><a name="l02770"></a><span class="lineno"><a class="line" href="structpsa__generate__key__extra__rsa.html#a53ccb9e4375f3c9af6e3ecfe111ce11d"> 2770</a></span>&#160;    uint32_t <a class="code" href="structpsa__generate__key__extra__rsa.html#a53ccb9e4375f3c9af6e3ecfe111ce11d">e</a>; </div><div class="line"><a name="l02771"></a><span class="lineno"> 2771</span>&#160;} <a class="code" href="structpsa__generate__key__extra__rsa.html">psa_generate_key_extra_rsa</a>;</div><div class="line"><a name="l02772"></a><span class="lineno"> 2772</span>&#160;</div><div class="line"><a name="l02815"></a><span class="lineno"> 2815</span>&#160;psa_status_t <a class="code" href="group__random.html#gada1d701903f6b4de6b4c6a1d613c1b10">psa_generate_key</a>(<a class="code" href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a> key,</div><div class="line"><a name="l02816"></a><span class="lineno"> 2816</span>&#160;                              psa_key_type_t type,</div><div class="line"><a name="l02817"></a><span class="lineno"> 2817</span>&#160;                              <span class="keywordtype">size_t</span> bits,</div><div class="line"><a name="l02818"></a><span class="lineno"> 2818</span>&#160;                              <span class="keyword">const</span> <span class="keywordtype">void</span> *extra,</div><div class="line"><a name="l02819"></a><span class="lineno"> 2819</span>&#160;                              <span class="keywordtype">size_t</span> extra_size);</div><div class="line"><a name="l02820"></a><span class="lineno"> 2820</span>&#160;</div><div class="line"><a name="l02823"></a><span class="lineno"> 2823</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l02824"></a><span class="lineno"> 2824</span>&#160;}</div><div class="line"><a name="l02825"></a><span class="lineno"> 2825</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l02826"></a><span class="lineno"> 2826</span>&#160;</div><div class="line"><a name="l02827"></a><span class="lineno"> 2827</span>&#160;<span class="comment">/* The file &quot;crypto_sizes.h&quot; contains definitions for size calculation</span></div><div class="line"><a name="l02828"></a><span class="lineno"> 2828</span>&#160;<span class="comment"> * macros whose definitions are implementation-specific. */</span></div><div class="line"><a name="l02829"></a><span class="lineno"> 2829</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="crypto__sizes_8h.html">crypto_sizes.h</a>&quot;</span></div><div class="line"><a name="l02830"></a><span class="lineno"> 2830</span>&#160;</div><div class="line"><a name="l02831"></a><span class="lineno"> 2831</span>&#160;<span class="comment">/* The file &quot;crypto_struct.h&quot; contains definitions for</span></div><div class="line"><a name="l02832"></a><span class="lineno"> 2832</span>&#160;<span class="comment"> * implementation-specific structs that are declared above. */</span></div><div class="line"><a name="l02833"></a><span class="lineno"> 2833</span>&#160;<span class="preprocessor">#include &quot;crypto_struct.h&quot;</span></div><div class="line"><a name="l02834"></a><span class="lineno"> 2834</span>&#160;</div><div class="line"><a name="l02835"></a><span class="lineno"> 2835</span>&#160;<span class="comment">/* The file &quot;crypto_extra.h&quot; contains vendor-specific definitions. This</span></div><div class="line"><a name="l02836"></a><span class="lineno"> 2836</span>&#160;<span class="comment"> * can include vendor-defined algorithms, extra functions, etc. */</span></div><div class="line"><a name="l02837"></a><span class="lineno"> 2837</span>&#160;<span class="preprocessor">#include &quot;crypto_extra.h&quot;</span></div><div class="line"><a name="l02838"></a><span class="lineno"> 2838</span>&#160;</div><div class="line"><a name="l02839"></a><span class="lineno"> 2839</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* PSA_CRYPTO_H */</span><span class="preprocessor"></span></div><div class="ttc" id="group__MAC_html_gac92b2930d6728e1be4d011c05d485822"><div class="ttname"><a href="group__MAC.html#gac92b2930d6728e1be4d011c05d485822">psa_mac_verify_finish</a></div><div class="ttdeci">psa_status_t psa_mac_verify_finish(psa_mac_operation_t *operation, const uint8_t *mac, size_t mac_length)</div></div>
<div class="ttc" id="group__random_html_ga1985eae417dfbccedf50d5fff54ea8c5"><div class="ttname"><a href="group__random.html#ga1985eae417dfbccedf50d5fff54ea8c5">psa_generate_random</a></div><div class="ttdeci">psa_status_t psa_generate_random(uint8_t *output, size_t output_size)</div><div class="ttdoc">Generate random bytes. </div></div>
<div class="ttc" id="group__asymmetric_html_ga3c0ba402bac217d623dba8320c2240c2"><div class="ttname"><a href="group__asymmetric.html#ga3c0ba402bac217d623dba8320c2240c2">psa_asymmetric_encrypt</a></div><div class="ttdeci">psa_status_t psa_asymmetric_encrypt(psa_key_slot_t key, psa_algorithm_t alg, const uint8_t *input, size_t input_length, const uint8_t *salt, size_t salt_length, uint8_t *output, size_t output_size, size_t *output_length)</div><div class="ttdoc">Encrypt a short message with a public key. </div></div>
<div class="ttc" id="group__policy_html_ga613f28712124f9149bd640614376ab5a"><div class="ttname"><a href="group__policy.html#ga613f28712124f9149bd640614376ab5a">psa_get_key_policy</a></div><div class="ttdeci">psa_status_t psa_get_key_policy(psa_key_slot_t key, psa_key_policy_t *policy)</div><div class="ttdoc">Get the usage policy for a key slot. </div></div>
<div class="ttc" id="group__policy_html_ga7746662b7503e484774d0ecb5d8ac2ab"><div class="ttname"><a href="group__policy.html#ga7746662b7503e484774d0ecb5d8ac2ab">psa_key_policy_get_usage</a></div><div class="ttdeci">psa_key_usage_t psa_key_policy_get_usage(const psa_key_policy_t *policy)</div><div class="ttdoc">Retrieve the usage field of a policy structure. </div></div>
<div class="ttc" id="group__derivation_html_ga1b6429f443a45e5f3209043abbbe8315"><div class="ttname"><a href="group__derivation.html#ga1b6429f443a45e5f3209043abbbe8315">psa_key_derivation</a></div><div class="ttdeci">psa_status_t psa_key_derivation(psa_crypto_generator_t *generator, psa_key_slot_t key, psa_algorithm_t alg, const uint8_t *salt, size_t salt_length, const uint8_t *label, size_t label_length, size_t capacity)</div></div>
<div class="ttc" id="group__crypto__types_html_ga4e8977c145cce5077c4bce7fec890ad9"><div class="ttname"><a href="group__crypto__types.html#ga4e8977c145cce5077c4bce7fec890ad9">psa_ecc_curve_t</a></div><div class="ttdeci">uint16_t psa_ecc_curve_t</div><div class="ttdef"><b>Definition:</b> crypto.h:478</div></div>
<div class="ttc" id="group__generators_html_ga563ca64537d90368899286b36d8cf7f3"><div class="ttname"><a href="group__generators.html#ga563ca64537d90368899286b36d8cf7f3">psa_generator_abort</a></div><div class="ttdeci">psa_status_t psa_generator_abort(psa_crypto_generator_t *generator)</div></div>
<div class="ttc" id="group__policy_html_gad7faa7e64aa771f7441c44ceff21af19"><div class="ttname"><a href="group__policy.html#gad7faa7e64aa771f7441c44ceff21af19">psa_set_key_policy</a></div><div class="ttdeci">psa_status_t psa_set_key_policy(psa_key_slot_t key, const psa_key_policy_t *policy)</div><div class="ttdoc">Set the usage policy on a key slot. </div></div>
<div class="ttc" id="group__cipher_html_gafd0caea99cf1052527e4089d37f5ab91"><div class="ttname"><a href="group__cipher.html#gafd0caea99cf1052527e4089d37f5ab91">psa_cipher_update</a></div><div class="ttdeci">psa_status_t psa_cipher_update(psa_cipher_operation_t *operation, const uint8_t *input, size_t input_length, unsigned char *output, size_t output_size, size_t *output_length)</div></div>
<div class="ttc" id="group__MAC_html_ga68ac2ad3253e9e27fcfbc788a4df8177"><div class="ttname"><a href="group__MAC.html#ga68ac2ad3253e9e27fcfbc788a4df8177">psa_mac_sign_setup</a></div><div class="ttdeci">psa_status_t psa_mac_sign_setup(psa_mac_operation_t *operation, psa_key_slot_t key, psa_algorithm_t alg)</div></div>
<div class="ttc" id="group__cipher_html_ga1359b2101f31637496ce7cc36c6e3d42"><div class="ttname"><a href="group__cipher.html#ga1359b2101f31637496ce7cc36c6e3d42">psa_cipher_set_iv</a></div><div class="ttdeci">psa_status_t psa_cipher_set_iv(psa_cipher_operation_t *operation, const unsigned char *iv, size_t iv_length)</div></div>
<div class="ttc" id="group__generators_html_gab5712ad29b78c2b170e64cc5bcfc1bce"><div class="ttname"><a href="group__generators.html#gab5712ad29b78c2b170e64cc5bcfc1bce">psa_generator_read</a></div><div class="ttdeci">psa_status_t psa_generator_read(psa_crypto_generator_t *generator, uint8_t *output, size_t output_length)</div></div>
<div class="ttc" id="group__persistence_html_ga1bd1ee6d00ebd9962fc6ad72cbd22ef8"><div class="ttname"><a href="group__persistence.html#ga1bd1ee6d00ebd9962fc6ad72cbd22ef8">psa_set_key_lifetime</a></div><div class="ttdeci">psa_status_t psa_set_key_lifetime(psa_key_slot_t key, psa_key_lifetime_t lifetime)</div><div class="ttdoc">Change the lifetime of a key slot. </div></div>
<div class="ttc" id="group__hash_html_ga65b16ef97d7f650899b7db4b7d1112ff"><div class="ttname"><a href="group__hash.html#ga65b16ef97d7f650899b7db4b7d1112ff">psa_hash_update</a></div><div class="ttdeci">psa_status_t psa_hash_update(psa_hash_operation_t *operation, const uint8_t *input, size_t input_length)</div></div>
<div class="ttc" id="group__key__management_html_ga2e9a60a9525ce6b3082a72df2080f0c5"><div class="ttname"><a href="group__key__management.html#ga2e9a60a9525ce6b3082a72df2080f0c5">psa_destroy_key</a></div><div class="ttdeci">psa_status_t psa_destroy_key(psa_key_slot_t key)</div><div class="ttdoc">Destroy a key and restore the slot to its default state. </div></div>
<div class="ttc" id="group__key__management_html_gaf105167657ab1d484cb4a51f93413717"><div class="ttname"><a href="group__key__management.html#gaf105167657ab1d484cb4a51f93413717">psa_get_key_information</a></div><div class="ttdeci">psa_status_t psa_get_key_information(psa_key_slot_t key, psa_key_type_t *type, size_t *bits)</div><div class="ttdoc">Get basic metadata about a key. </div></div>
<div class="ttc" id="group__basic_html_ga2de150803fc2f7dc6101d5af7e921dd9"><div class="ttname"><a href="group__basic.html#ga2de150803fc2f7dc6101d5af7e921dd9">psa_crypto_init</a></div><div class="ttdeci">psa_status_t psa_crypto_init(void)</div><div class="ttdoc">Library initialization. </div></div>
<div class="ttc" id="group__generators_html_ga06c1ba3d989827d909b4b01ffe983beb"><div class="ttname"><a href="group__generators.html#ga06c1ba3d989827d909b4b01ffe983beb">psa_generator_import_key</a></div><div class="ttdeci">psa_status_t psa_generator_import_key(psa_key_slot_t key, psa_key_type_t type, size_t bits, psa_crypto_generator_t *generator)</div></div>
<div class="ttc" id="group__MAC_html_gac22bc0125580c96724a09226cfbc97f2"><div class="ttname"><a href="group__MAC.html#gac22bc0125580c96724a09226cfbc97f2">psa_mac_sign_finish</a></div><div class="ttdeci">psa_status_t psa_mac_sign_finish(psa_mac_operation_t *operation, uint8_t *mac, size_t mac_size, size_t *mac_length)</div></div>
<div class="ttc" id="group__cipher_html_ga1dcb58b8befe23f8a4d7a1d49c99249b"><div class="ttname"><a href="group__cipher.html#ga1dcb58b8befe23f8a4d7a1d49c99249b">psa_cipher_finish</a></div><div class="ttdeci">psa_status_t psa_cipher_finish(psa_cipher_operation_t *operation, uint8_t *output, size_t output_size, size_t *output_length)</div></div>
<div class="ttc" id="group__cipher_html_ga735c9d51b820e1d4cb45f2406ebfae98"><div class="ttname"><a href="group__cipher.html#ga735c9d51b820e1d4cb45f2406ebfae98">psa_cipher_encrypt_setup</a></div><div class="ttdeci">psa_status_t psa_cipher_encrypt_setup(psa_cipher_operation_t *operation, psa_key_slot_t key, psa_algorithm_t alg)</div></div>
<div class="ttc" id="group__cipher_html_ga44857cf5e0c3d134a3c560f8ff5b50aa"><div class="ttname"><a href="group__cipher.html#ga44857cf5e0c3d134a3c560f8ff5b50aa">psa_cipher_generate_iv</a></div><div class="ttdeci">psa_status_t psa_cipher_generate_iv(psa_cipher_operation_t *operation, unsigned char *iv, size_t iv_size, size_t *iv_length)</div></div>
<div class="ttc" id="group__hash_html_ga7be923c5700c9c70ef77ee9b76d1a5c0"><div class="ttname"><a href="group__hash.html#ga7be923c5700c9c70ef77ee9b76d1a5c0">psa_hash_verify</a></div><div class="ttdeci">psa_status_t psa_hash_verify(psa_hash_operation_t *operation, const uint8_t *hash, size_t hash_length)</div></div>
<div class="ttc" id="group__asymmetric_html_ga48091460d1ead078d93caa3611aec976"><div class="ttname"><a href="group__asymmetric.html#ga48091460d1ead078d93caa3611aec976">psa_asymmetric_sign</a></div><div class="ttdeci">psa_status_t psa_asymmetric_sign(psa_key_slot_t key, psa_algorithm_t alg, const uint8_t *hash, size_t hash_length, uint8_t *signature, size_t signature_size, size_t *signature_length)</div><div class="ttdoc">Sign a hash or short message with a private key. </div></div>
<div class="ttc" id="group__policy_html_gad49eb85e3fcbe70f763f511ac83e762e"><div class="ttname"><a href="group__policy.html#gad49eb85e3fcbe70f763f511ac83e762e">psa_key_policy_init</a></div><div class="ttdeci">void psa_key_policy_init(psa_key_policy_t *policy)</div><div class="ttdoc">Initialize a key policy structure to a default that forbids all usage of the key. ...</div></div>
<div class="ttc" id="structpsa__generate__key__extra__rsa_html_a53ccb9e4375f3c9af6e3ecfe111ce11d"><div class="ttname"><a href="structpsa__generate__key__extra__rsa.html#a53ccb9e4375f3c9af6e3ecfe111ce11d">psa_generate_key_extra_rsa::e</a></div><div class="ttdeci">uint32_t e</div><div class="ttdef"><b>Definition:</b> crypto.h:2770</div></div>
<div class="ttc" id="group__crypto__types_html_gac2e4d47f1300d73c2f829a6d99252d69"><div class="ttname"><a href="group__crypto__types.html#gac2e4d47f1300d73c2f829a6d99252d69">psa_algorithm_t</a></div><div class="ttdeci">uint32_t psa_algorithm_t</div><div class="ttdoc">Encoding of a cryptographic algorithm. </div><div class="ttdef"><b>Definition:</b> crypto.h:560</div></div>
<div class="ttc" id="group__hash_html_ga3c4205d2ce66c4095fc5c78c25273fab"><div class="ttname"><a href="group__hash.html#ga3c4205d2ce66c4095fc5c78c25273fab">psa_hash_operation_t</a></div><div class="ttdeci">struct psa_hash_operation_s psa_hash_operation_t</div><div class="ttdef"><b>Definition:</b> crypto.h:1447</div></div>
<div class="ttc" id="group__MAC_html_gacd8dd54855ba1bc0a03f104f252884fd"><div class="ttname"><a href="group__MAC.html#gacd8dd54855ba1bc0a03f104f252884fd">psa_mac_abort</a></div><div class="ttdeci">psa_status_t psa_mac_abort(psa_mac_operation_t *operation)</div></div>
<div class="ttc" id="group__hash_html_ga8d72896cf70fc4d514c5c6b978912515"><div class="ttname"><a href="group__hash.html#ga8d72896cf70fc4d514c5c6b978912515">psa_hash_setup</a></div><div class="ttdeci">psa_status_t psa_hash_setup(psa_hash_operation_t *operation, psa_algorithm_t alg)</div></div>
<div class="ttc" id="group__aead_html_ga5b88ad2cfbf2e98039858416fa3ebd7a"><div class="ttname"><a href="group__aead.html#ga5b88ad2cfbf2e98039858416fa3ebd7a">psa_aead_decrypt</a></div><div class="ttdeci">psa_status_t psa_aead_decrypt(psa_key_slot_t key, psa_algorithm_t alg, const uint8_t *nonce, size_t nonce_length, const uint8_t *additional_data, size_t additional_data_length, const uint8_t *ciphertext, size_t ciphertext_length, uint8_t *plaintext, size_t plaintext_size, size_t *plaintext_length)</div></div>
<div class="ttc" id="group__key__management_html_gace37363530e2525a2562f07ceec8efb5"><div class="ttname"><a href="group__key__management.html#gace37363530e2525a2562f07ceec8efb5">psa_import_key</a></div><div class="ttdeci">psa_status_t psa_import_key(psa_key_slot_t key, psa_key_type_t type, const uint8_t *data, size_t data_length)</div><div class="ttdoc">Import a key in binary format. </div></div>
<div class="ttc" id="group__policy_html_ga7bb9de71337e0e98de843aa7f9b55f25"><div class="ttname"><a href="group__policy.html#ga7bb9de71337e0e98de843aa7f9b55f25">psa_key_usage_t</a></div><div class="ttdeci">uint32_t psa_key_usage_t</div><div class="ttdoc">Encoding of permitted usage on a key. </div><div class="ttdef"><b>Definition:</b> crypto.h:1225</div></div>
<div class="ttc" id="group__persistence_html_gaf0daaa1dba14dc324ca83dfe1495a5e2"><div class="ttname"><a href="group__persistence.html#gaf0daaa1dba14dc324ca83dfe1495a5e2">psa_get_key_lifetime</a></div><div class="ttdeci">psa_status_t psa_get_key_lifetime(psa_key_slot_t key, psa_key_lifetime_t *lifetime)</div><div class="ttdoc">Retrieve the lifetime of a key slot. </div></div>
<div class="ttc" id="group__policy_html_gaf553efd409845b6d09ff25ce2ba36607"><div class="ttname"><a href="group__policy.html#gaf553efd409845b6d09ff25ce2ba36607">psa_key_policy_t</a></div><div class="ttdeci">struct psa_key_policy_s psa_key_policy_t</div><div class="ttdef"><b>Definition:</b> crypto.h:1291</div></div>
<div class="ttc" id="group__aead_html_ga14e4068a3d328515a4884f3037904d54"><div class="ttname"><a href="group__aead.html#ga14e4068a3d328515a4884f3037904d54">psa_aead_encrypt</a></div><div class="ttdeci">psa_status_t psa_aead_encrypt(psa_key_slot_t key, psa_algorithm_t alg, const uint8_t *nonce, size_t nonce_length, const uint8_t *additional_data, size_t additional_data_length, const uint8_t *plaintext, size_t plaintext_length, uint8_t *ciphertext, size_t ciphertext_size, size_t *ciphertext_length)</div></div>
<div class="ttc" id="group__asymmetric_html_gaee3e92946c1c4b3dfa90879e2f7d1321"><div class="ttname"><a href="group__asymmetric.html#gaee3e92946c1c4b3dfa90879e2f7d1321">psa_asymmetric_verify</a></div><div class="ttdeci">psa_status_t psa_asymmetric_verify(psa_key_slot_t key, psa_algorithm_t alg, const uint8_t *hash, size_t hash_length, const uint8_t *signature, size_t signature_length)</div><div class="ttdoc">Verify the signature a hash or short message using a public key. </div></div>
<div class="ttc" id="group__policy_html_gac16792fd6d375a5f76d372090df40607"><div class="ttname"><a href="group__policy.html#gac16792fd6d375a5f76d372090df40607">psa_key_policy_set_usage</a></div><div class="ttdeci">void psa_key_policy_set_usage(psa_key_policy_t *policy, psa_key_usage_t usage, psa_algorithm_t alg)</div><div class="ttdoc">Set the standard fields of a policy structure. </div></div>
<div class="ttc" id="group__random_html_gada1d701903f6b4de6b4c6a1d613c1b10"><div class="ttname"><a href="group__random.html#gada1d701903f6b4de6b4c6a1d613c1b10">psa_generate_key</a></div><div class="ttdeci">psa_status_t psa_generate_key(psa_key_slot_t key, psa_key_type_t type, size_t bits, const void *extra, size_t extra_size)</div><div class="ttdoc">Generate a key or key pair. </div></div>
<div class="ttc" id="group__key__management_html_gaa67bc459b20028b268f3d75a05afe022"><div class="ttname"><a href="group__key__management.html#gaa67bc459b20028b268f3d75a05afe022">psa_export_key</a></div><div class="ttdeci">psa_status_t psa_export_key(psa_key_slot_t key, uint8_t *data, size_t data_size, size_t *data_length)</div><div class="ttdoc">Export a key in binary format. </div></div>
<div class="ttc" id="crypto__sizes_8h_html"><div class="ttname"><a href="crypto__sizes_8h.html">crypto_sizes.h</a></div><div class="ttdoc">PSA cryptography module: Mbed TLS buffer size macros. </div></div>
<div class="ttc" id="group__MAC_html_ga5560af371497babefe03c9da4e8a1c05"><div class="ttname"><a href="group__MAC.html#ga5560af371497babefe03c9da4e8a1c05">psa_mac_update</a></div><div class="ttdeci">psa_status_t psa_mac_update(psa_mac_operation_t *operation, const uint8_t *input, size_t input_length)</div></div>
<div class="ttc" id="group__hash_html_gab0b4d5f9912a615559497a467b532928"><div class="ttname"><a href="group__hash.html#gab0b4d5f9912a615559497a467b532928">psa_hash_abort</a></div><div class="ttdeci">psa_status_t psa_hash_abort(psa_hash_operation_t *operation)</div></div>
<div class="ttc" id="group__cipher_html_ga1399de29db657e3737bb09927aae51fa"><div class="ttname"><a href="group__cipher.html#ga1399de29db657e3737bb09927aae51fa">psa_cipher_operation_t</a></div><div class="ttdeci">struct psa_cipher_operation_s psa_cipher_operation_t</div><div class="ttdef"><b>Definition:</b> crypto.h:1903</div></div>
<div class="ttc" id="group__crypto__types_html_ga578159487dfc7096cb191b0d2befe628"><div class="ttname"><a href="group__crypto__types.html#ga578159487dfc7096cb191b0d2befe628">psa_key_type_t</a></div><div class="ttdeci">uint32_t psa_key_type_t</div><div class="ttdoc">Encoding of a key type. </div><div class="ttdef"><b>Definition:</b> crypto.h:346</div></div>
<div class="ttc" id="group__key__management_html_ga7355b38f8eb9330db2786604f4a83a3b"><div class="ttname"><a href="group__key__management.html#ga7355b38f8eb9330db2786604f4a83a3b">psa_export_public_key</a></div><div class="ttdeci">psa_status_t psa_export_public_key(psa_key_slot_t key, uint8_t *data, size_t data_size, size_t *data_length)</div><div class="ttdoc">Export a public key or the public part of a key pair in binary format. </div></div>
<div class="ttc" id="group__MAC_html_gac7d1c3d075ce1604a54cbbc9933fa39d"><div class="ttname"><a href="group__MAC.html#gac7d1c3d075ce1604a54cbbc9933fa39d">psa_mac_verify_setup</a></div><div class="ttdeci">psa_status_t psa_mac_verify_setup(psa_mac_operation_t *operation, psa_key_slot_t key, psa_algorithm_t alg)</div></div>
<div class="ttc" id="group__asymmetric_html_ga3094be979f37aa2865c283167ba907e6"><div class="ttname"><a href="group__asymmetric.html#ga3094be979f37aa2865c283167ba907e6">psa_asymmetric_decrypt</a></div><div class="ttdeci">psa_status_t psa_asymmetric_decrypt(psa_key_slot_t key, psa_algorithm_t alg, const uint8_t *input, size_t input_length, const uint8_t *salt, size_t salt_length, uint8_t *output, size_t output_size, size_t *output_length)</div><div class="ttdoc">Decrypt a short message with a private key. </div></div>
<div class="ttc" id="group__cipher_html_ga8ce1efaa648d7e0dd00e878d655d2950"><div class="ttname"><a href="group__cipher.html#ga8ce1efaa648d7e0dd00e878d655d2950">psa_cipher_decrypt_setup</a></div><div class="ttdeci">psa_status_t psa_cipher_decrypt_setup(psa_cipher_operation_t *operation, psa_key_slot_t key, psa_algorithm_t alg)</div></div>
<div class="ttc" id="group__platform_html_gac3da92a6b8a7f0c01dc348f8e0432e4c"><div class="ttname"><a href="group__platform.html#gac3da92a6b8a7f0c01dc348f8e0432e4c">psa_key_slot_t</a></div><div class="ttdeci">_unsigned_integral_type_ psa_key_slot_t</div><div class="ttdoc">Key slot number. </div><div class="ttdef"><b>Definition:</b> crypto.h:51</div></div>
<div class="ttc" id="group__MAC_html_ga78f0838b0c4e3db28b26355624d4bd37"><div class="ttname"><a href="group__MAC.html#ga78f0838b0c4e3db28b26355624d4bd37">psa_mac_operation_t</a></div><div class="ttdeci">struct psa_mac_operation_s psa_mac_operation_t</div><div class="ttdef"><b>Definition:</b> crypto.h:1660</div></div>
<div class="ttc" id="group__persistence_html_ga6821ff6dd39dc2bc370ded760ad8b0cf"><div class="ttname"><a href="group__persistence.html#ga6821ff6dd39dc2bc370ded760ad8b0cf">psa_key_lifetime_t</a></div><div class="ttdeci">uint32_t psa_key_lifetime_t</div><div class="ttdef"><b>Definition:</b> crypto.h:1374</div></div>
<div class="ttc" id="group__policy_html_gaadf16b89ace53e1d2cb5bcb0aef24c86"><div class="ttname"><a href="group__policy.html#gaadf16b89ace53e1d2cb5bcb0aef24c86">psa_key_policy_get_algorithm</a></div><div class="ttdeci">psa_algorithm_t psa_key_policy_get_algorithm(const psa_key_policy_t *policy)</div><div class="ttdoc">Retrieve the algorithm field of a policy structure. </div></div>
<div class="ttc" id="group__generators_html_ga7453491e3b440193be2c5dccc2040fd2"><div class="ttname"><a href="group__generators.html#ga7453491e3b440193be2c5dccc2040fd2">psa_get_generator_capacity</a></div><div class="ttdeci">psa_status_t psa_get_generator_capacity(const psa_crypto_generator_t *generator, size_t *capacity)</div></div>
<div class="ttc" id="group__basic_html_ga05676e70ba5c6a7565aff3c36677c1f9"><div class="ttname"><a href="group__basic.html#ga05676e70ba5c6a7565aff3c36677c1f9">psa_status_t</a></div><div class="ttdeci">int32_t psa_status_t</div><div class="ttdoc">Function return status. </div><div class="ttdef"><b>Definition:</b> crypto.h:85</div></div>
<div class="ttc" id="group__cipher_html_gaad482cdca2098bca0620596aaa02eaa4"><div class="ttname"><a href="group__cipher.html#gaad482cdca2098bca0620596aaa02eaa4">psa_cipher_abort</a></div><div class="ttdeci">psa_status_t psa_cipher_abort(psa_cipher_operation_t *operation)</div></div>
<div class="ttc" id="group__generators_html_ga1f894c4fba202ef8e307d72caf489e3b"><div class="ttname"><a href="group__generators.html#ga1f894c4fba202ef8e307d72caf489e3b">psa_crypto_generator_t</a></div><div class="ttdeci">struct psa_crypto_generator_s psa_crypto_generator_t</div><div class="ttdef"><b>Definition:</b> crypto.h:2549</div></div>
<div class="ttc" id="group__hash_html_ga4795fd06a0067b0adcd92e9627b8c97e"><div class="ttname"><a href="group__hash.html#ga4795fd06a0067b0adcd92e9627b8c97e">psa_hash_finish</a></div><div class="ttdeci">psa_status_t psa_hash_finish(psa_hash_operation_t *operation, uint8_t *hash, size_t hash_size, size_t *hash_length)</div></div>
<div class="ttc" id="structpsa__generate__key__extra__rsa_html"><div class="ttname"><a href="structpsa__generate__key__extra__rsa.html">psa_generate_key_extra_rsa</a></div><div class="ttdef"><b>Definition:</b> crypto.h:2769</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
